revo-loans_api 0.0.28 → 0.0.33

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9281d11d79b77fccf2bd170ddc0097a4634a40727a975b137ccc518f7aacf316
4
- data.tar.gz: e8a66ea2dc25eccd1dda722c5612d6263551c8a67b70c675fccb3a0d99850d13
3
+ metadata.gz: e8ddc81c75a39ce5e816c1d35a6d6d1f76501dc51afe21327fe965f5b3ec5df5
4
+ data.tar.gz: 201ccaa12db01d9b59f75d58450323899327092044f3937bbeb8aaec1c90be43
5
5
  SHA512:
6
- metadata.gz: 199b54f9e8d5dee7456577936d3809125c46493771b4435c411478844df50e8d5f7d89c8d53a77bcb07f038e7727cc4d320b1d1cd6a6f95f18a35a171047f76e
7
- data.tar.gz: f1379847f7dcdc3da1356a5785ed364828771d92d25519329f8dd4ab6d33716f76a9985ade4bb6a8bc061a779660605834db4bd75f140db642806ddf5b552a5c
6
+ metadata.gz: '0268f616707aee95061b1d22af70fbff44bbec87cc920222b7bf9c3f6ec6db2344540e9c59ca46820a5e7853e72696a9ac47e58674cc160da585740bc7c542c0'
7
+ data.tar.gz: a2f6ab18d01153338c7806a3904e930ca19ae235e03338f8a5aa59091ee426081153d3cc65401db5ccd7fe48242903b5d80a2a3aab43dc5624f99ca64adc72d7
@@ -1,34 +1,34 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- revo-loans_api (0.0.28)
4
+ revo-loans_api (0.0.33)
5
5
  activesupport
6
6
  http
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activesupport (6.0.2.2)
11
+ activesupport (6.0.3.2)
12
12
  concurrent-ruby (~> 1.0, >= 1.0.2)
13
13
  i18n (>= 0.7, < 2)
14
14
  minitest (~> 5.1)
15
15
  tzinfo (~> 1.1)
16
- zeitwerk (~> 2.2)
16
+ zeitwerk (~> 2.2, >= 2.2.2)
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.6)
20
+ concurrent-ruby (1.1.7)
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.12.2)
26
+ ffi (1.13.1)
27
27
  ffi-compiler (1.0.1)
28
28
  ffi (>= 1.0.0)
29
29
  rake
30
30
  hashdiff (1.0.0)
31
- http (4.3.0)
31
+ http (4.4.1)
32
32
  addressable (~> 2.3)
33
33
  http-cookie (~> 1.0)
34
34
  http-form_data (~> 2.2)
@@ -38,9 +38,9 @@ GEM
38
38
  http-form_data (2.3.0)
39
39
  http-parser (1.2.1)
40
40
  ffi-compiler (>= 1.0, < 2.0)
41
- i18n (1.8.2)
41
+ i18n (1.8.5)
42
42
  concurrent-ruby (~> 1.0)
43
- minitest (5.14.0)
43
+ minitest (5.14.2)
44
44
  public_suffix (4.0.1)
45
45
  rake (10.5.0)
46
46
  rspec (3.9.0)
@@ -58,17 +58,17 @@ GEM
58
58
  rspec-support (3.9.0)
59
59
  safe_yaml (1.0.5)
60
60
  thread_safe (0.3.6)
61
- tzinfo (1.2.6)
61
+ tzinfo (1.2.7)
62
62
  thread_safe (~> 0.1)
63
63
  unf (0.1.4)
64
64
  unf_ext
65
- unf_ext (0.0.7.6)
65
+ unf_ext (0.0.7.7)
66
66
  vcr (5.0.0)
67
67
  webmock (3.7.6)
68
68
  addressable (>= 2.3.6)
69
69
  crack (>= 0.3.2)
70
70
  hashdiff (>= 0.4.0, < 2.0.0)
71
- zeitwerk (2.3.0)
71
+ zeitwerk (2.4.0)
72
72
 
73
73
  PLATFORMS
74
74
  ruby
@@ -216,6 +216,10 @@ class Revo::LoansApi::Client
216
216
  make_request(:get, "clients/#{guid}")
217
217
  end
218
218
 
219
+ def get_client_info(guid:)
220
+ make_request(:get, "clients/#{guid}/informers")
221
+ end
222
+
219
223
  def create_virtual_card(token:, term_id:, force_approve: false)
220
224
  make_request(
221
225
  :post,
@@ -228,7 +232,7 @@ class Revo::LoansApi::Client
228
232
  def create_card_loan(token:, term_id:, force_approve: false)
229
233
  make_request(
230
234
  :post,
231
- "loan_requests/#{token}/card_loan",
235
+ "loan_requests/#{token}/virtual_card_loan",
232
236
  params: { term_id: term_id, force_approve: force_approve },
233
237
  headers: { 'Application-Source': application_source }
234
238
  )
@@ -250,6 +254,29 @@ class Revo::LoansApi::Client
250
254
  )
251
255
  end
252
256
 
257
+ def send_restructuring_confirmation_code(client_id:, product:)
258
+ make_request(:post, "clients/#{client_id}/restructuring/#{product}")
259
+ end
260
+
261
+ def restructuring_info(client_id:, product:)
262
+ make_request(:get, "clients/#{client_id}/restructuring/#{product}/info")
263
+ end
264
+
265
+ def confirm_restructuring(client_id:, code:, product:)
266
+ make_request(
267
+ :post,
268
+ "clients/#{client_id}/restructuring/#{product}/confirmation",
269
+ params: { code: code }
270
+ )
271
+ end
272
+
273
+ def restructuring_document(client_id:, product:, format: 'pdf')
274
+ make_request(
275
+ :get,
276
+ "clients/#{client_id}/restructuring/#{product}/document.#{format}"
277
+ )
278
+ end
279
+
253
280
  def increase_client_limit(client_id:, amount:)
254
281
  make_request(
255
282
  :patch,
@@ -344,7 +371,10 @@ class Revo::LoansApi::Client
344
371
  if response.content_type.mime_type == API_CONTENT_TYPE
345
372
  parse(response)
346
373
  else
347
- { errors: { base: [:unexpected_response] } }
374
+ {
375
+ errors: { base: [:unexpected_response] },
376
+ raw_response: response.to_s.presence
377
+ }
348
378
  end
349
379
  end
350
380
 
@@ -1,5 +1,5 @@
1
1
  module Revo
2
2
  module LoansApi
3
- VERSION = '0.0.28'.freeze
3
+ VERSION = '0.0.33'.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.28
4
+ version: 0.0.33
5
5
  platform: ruby
6
6
  authors:
7
7
  - Revo Developers
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-05-14 00:00:00.000000000 Z
11
+ date: 2020-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http