revo-loans_api 0.0.14 → 0.0.15

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: 3471bb018a3a6beec19796bd0ea5148b64f56fa09b20d588f6fb378b2251c0c2
4
- data.tar.gz: 71ba42ebc7a14a98ef86aadd5de803bf82124a14130a6873555f5f71ce0b6924
3
+ metadata.gz: d9a352b4dc6274898a60d03e04dad9229ed7d48e674e0c8e72111270f2db43ca
4
+ data.tar.gz: dc7bf6f9ab3f58a520a0446825ae734a836ffd9fd910cc87e67176fcd9a9fec4
5
5
  SHA512:
6
- metadata.gz: 3cad0b522d47a35c39424d4ba4fc0adc5f2f64587ddaf0a0b864e8f96d44fc991db17f27e87c9985cfff6ffa0a05c655993f826dc93a837de14cc2fd91a78f7e
7
- data.tar.gz: 629cbaea29f82a6dc007ee9863d2a4bcc2519144a46f6bff05b512c67da237b7f18bc8aa90711461f3dacf8f0e06740d1ef016fd87e00f82e7b92645dfde2aa7
6
+ metadata.gz: d5576d216c82c88dd27b3ffbce6b4f598037b709f8772f3528a84988655b1f0737f5000ad6c31009f8ae706dc4473c69bf84c483ae42cd0e0128337c449bd58c
7
+ data.tar.gz: 432a0226694c8b0a8924157fe0942a1d20bc2b3f6b763aabaf8a9865a1d7d92a244c361473a94c3d94e2b93904f5ad01846f438258339e2cfb0b4797766ba497
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- revo-loans_api (0.0.14)
4
+ revo-loans_api (0.0.15)
5
5
  activesupport
6
6
  http
7
7
 
data/README.md CHANGED
@@ -452,14 +452,14 @@ result.response # => `{ errors: { mobile_phone: ['error'] } }`
452
452
 
453
453
 
454
454
  ```ruby
455
- result = client.send_billing_shift_confirmation_code(mobile_phone: '8881234567')
455
+ result = client.send_billing_shift_confirmation_code(client_id: 1)
456
456
 
457
457
  # Success:
458
458
  result.success? # => true
459
459
  result.response # => `nil`
460
460
  # Failure:
461
461
  result.success? # => false
462
- result.response # => `{ errors: { mobile_phone: ['error'] } }`
462
+ result.response # => `{ errors: { client: ['error'] } }`
463
463
  ```
464
464
 
465
465
 
@@ -467,7 +467,7 @@ result.response # => `{ errors: { mobile_phone: ['error'] } }`
467
467
 
468
468
 
469
469
  ```ruby
470
- result = client.billing_shift_info(mobile_phone: '8881234567')
470
+ result = client.billing_shift_info(client_id: 1)
471
471
  # Success:
472
472
  result.success? # => true
473
473
  result.response # => =>
@@ -478,7 +478,21 @@ result.response # => =>
478
478
  # ]
479
479
  # Failure:
480
480
  result.success? # => false
481
- result.response # => `{ errors: { mobile_phone: ['error'] } }`
481
+ result.response # => `{ errors: { client: ['error'] } }`
482
+ ```
483
+
484
+
485
+ ### Confirm billing shift
486
+
487
+
488
+ ```ruby
489
+ result = client.confirm_billing_shift(client_id: 1, code: '1111', billing_chain: 1)
490
+ # Success:
491
+ result.success? # => true
492
+ result.response # => `nil`
493
+ # Failure:
494
+ result.success? # => false
495
+ result.response # => `{ errors: { client: ['error'] } }`
482
496
  ```
483
497
 
484
498
 
@@ -150,12 +150,17 @@ class Revo::LoansApi::Client
150
150
  make_request(:post, "loan_requests/#{token}/card_loan", term_id: term_id)
151
151
  end
152
152
 
153
- def send_billing_shift_confirmation_code(mobile_phone:)
154
- make_request(:post, 'clients/billing_shift', mobile_phone: mobile_phone)
153
+ def send_billing_shift_confirmation_code(client_id:)
154
+ make_request(:post, "clients/#{client_id}/billing_shift")
155
155
  end
156
156
 
157
- def billing_shift_info(mobile_phone:)
158
- make_request(:get, "clients/billing_shift/info?mobile_phone=#{mobile_phone}")
157
+ def billing_shift_info(client_id:)
158
+ make_request(:get, "clients/#{client_id}/billing_shift/info")
159
+ end
160
+
161
+ def confirm_billing_shift(client_id:, code:, billing_chain:)
162
+ make_request(:post, "clients/#{client_id}/billing_shift/confirmation",
163
+ code: code, billing_chain: billing_chain)
159
164
  end
160
165
 
161
166
  def increase_client_limit(client_id:, amount:)
@@ -1,5 +1,5 @@
1
1
  module Revo
2
2
  module LoansApi
3
- VERSION = '0.0.14'.freeze
3
+ VERSION = '0.0.15'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: revo-loans_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.14
4
+ version: 0.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Revo Developers