revo-loans_api 0.0.50 → 0.0.54

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: 0c4fa780fcb87b754e0f192626209ec91725fbb0cf2cae99dc85218096f80860
4
- data.tar.gz: 11719e5abd6f42bc2415ee950185217fe1722f4b67e34438d1200e618066dbc8
3
+ metadata.gz: 6b8bf2f83d92afbc6a1324fd89e742b231eea38a38016b9ff200f044d5a59d06
4
+ data.tar.gz: 9664471561dfe0408f32c45f71c1329984f8706a50f268b7ba3b74cb08514524
5
5
  SHA512:
6
- metadata.gz: 6a67da7430f0fdc674409a85b8449e2a786ac7e91334760451ae70c2a4f35a92773bb4fd3f0049f3d13ce41f5b2443c5ae1b240cb036e8746056a95617400f1b
7
- data.tar.gz: 2644d6511b051beb09fb9f56f45351f035c05ac8410951333abea1b9d7ff10c9ae523302ed98676d62ab15bad169b6b51bc6cbf056d3ee5661e3f2f5efa84296
6
+ metadata.gz: cdbfc367d6163167ce60333c784c22e81e99379375b9ff1a89932d8c3ef0047454f1c7942274e935a461873f669d3d96a8403d9093a0a6a43799fb76ac43bdd0
7
+ data.tar.gz: 0f11c8fdbd44837f9b16a4e263d63a795efbd8b4915203380c0c3d95d9505bc9dc4776d7e22a90d59f19ba85122359e8db3b3f90d8a8e8ee9a73569466b67223
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- revo-loans_api (0.0.50)
4
+ revo-loans_api (0.0.54)
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)
@@ -254,11 +264,18 @@ class Revo::LoansApi::Client
254
264
  make_request(:post, "clients/#{client_id}/billing_shift")
255
265
  end
256
266
 
257
- def confirm_billing_shift(client_id:, code:, billing_chain:)
267
+ def confirm_billing_shift(client_id:, billing_chain:, code: nil, session_id: nil)
268
+ confirmation_params = {
269
+ billing_chain: billing_chain
270
+ }
271
+
272
+ confirmation_params[:code] = code if code
273
+ confirmation_params[:session_id] = session_id if session_id
274
+
258
275
  make_request(
259
276
  :post,
260
277
  "clients/#{client_id}/billing_shift/confirmation",
261
- params: { code: code, billing_chain: billing_chain }
278
+ params: confirmation_params
262
279
  )
263
280
  end
264
281
 
@@ -365,6 +382,14 @@ class Revo::LoansApi::Client
365
382
  make_request(:get, "clients/#{id}/address", params: { address: address })
366
383
  end
367
384
 
385
+ def create_stretch_document(id:, payload:)
386
+ make_request(:post, "offer/stretch/#{id}", params: { payload: payload })
387
+ end
388
+
389
+ def update_credit_facility(id:, fields:)
390
+ make_request(:patch, "credit_facilities/#{id}", params: { fields: fields })
391
+ end
392
+
368
393
  private
369
394
 
370
395
  API_CONTENT_TYPE = 'application/json'.freeze
@@ -1,5 +1,5 @@
1
1
  module Revo
2
2
  module LoansApi
3
- VERSION = '0.0.50'.freeze
3
+ VERSION = '0.0.54'.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.50
4
+ version: 0.0.54
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-07-15 00:00:00.000000000 Z
11
+ date: 2021-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http