revo-loans_api 0.0.51 → 0.0.55

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: 07d3724a4ce9bc363e1f4cc40bbe0b37cae80ef9f20e547b2cc9902004dc2af8
4
- data.tar.gz: fdd4fa41002ad7758effd685a2703e65117bbdc7d23b0e1cbb21826fb9b98156
3
+ metadata.gz: f2d82f5219ac3a1e36b5d661227764af9e4c9c8e0a4af826b37a05940216b8d9
4
+ data.tar.gz: 5db684b478ceacf10e73a56e2c095e785f8fe799d3e08eab364e5d33d94ca6fd
5
5
  SHA512:
6
- metadata.gz: 93cc0edbeb96840629367a617532ea66524704ffb32de4049e02a0b034702ee49f28b0e09c50cd1d25bfd2e43b8d27330710354db96ddfe7ee33dade51a11212
7
- data.tar.gz: 5e172c3c91e0e6c80d741c9e7097dab76e84fc081fd36e0a1f67b61b38220eb787cc4c1e487697af3433a5b3cc17605c7bd0e550f4ef4ad20f948cab8cb0aa27
6
+ metadata.gz: f1d625942be33e95978bef1e04251b90140af9111ec91313c863e0f4b95c1c45ef14ccc80986492a5abcee0bfeb84e7bd9097fc53cd61c6c954f9dcbf3b763a9
7
+ data.tar.gz: c2baa257bb80d4058d5f9a89482b0924e1b116b5f9e5480049dab6ba8b07a1bd68118442377434e2faa9bf6a2dfd43751798b0bf169c1e7c0a2287b5e7ba9b5e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- revo-loans_api (0.0.51)
4
+ revo-loans_api (0.0.55)
5
5
  activesupport
6
6
  http
7
7
 
@@ -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
 
@@ -369,6 +395,10 @@ class Revo::LoansApi::Client
369
395
  make_request(:post, "offer/stretch/#{id}", params: { payload: payload })
370
396
  end
371
397
 
398
+ def update_credit_facility(id:, fields:)
399
+ make_request(:patch, "credit_facilities/#{id}", params: { fields: fields })
400
+ end
401
+
372
402
  private
373
403
 
374
404
  API_CONTENT_TYPE = 'application/json'.freeze
@@ -1,5 +1,5 @@
1
1
  module Revo
2
2
  module LoansApi
3
- VERSION = '0.0.51'.freeze
3
+ VERSION = '0.0.55'.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.51
4
+ version: 0.0.55
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-21 00:00:00.000000000 Z
11
+ date: 2021-12-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http