revo-loans_api 0.0.53 → 0.0.54

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: f1e04be7c4fa5e5d792649dfe12601df074bbddf2b96d1d1c2bc949d63ae0c9e
4
- data.tar.gz: 65c04a152a3acf6f21b7ebd8d061da2bdcf419824d6a0b1525b0027a63af508b
3
+ metadata.gz: 6b8bf2f83d92afbc6a1324fd89e742b231eea38a38016b9ff200f044d5a59d06
4
+ data.tar.gz: 9664471561dfe0408f32c45f71c1329984f8706a50f268b7ba3b74cb08514524
5
5
  SHA512:
6
- metadata.gz: 1485cf81e1e3fd8bae0539fcddddf76e672999b9778e54d635ed56b0438f12fff3f3e9901903e6bcaa9ea0a7794b184bfce7650f2436d393663718654b8e247f
7
- data.tar.gz: fe58bbfd07ce80e264d5a837339c21b99d9fb06ddd83896f0ee9f998b69b7fb8e7e3b93fad6f1bda0fcc32d8e2ce2f9c990b90c01716ea634684cae645575987
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.53)
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
 
@@ -1,5 +1,5 @@
1
1
  module Revo
2
2
  module LoansApi
3
- VERSION = '0.0.53'.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.53
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-10-11 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