revo-loans_api 0.0.11 → 0.0.12

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: b8603f7a7daefab75484fcb350139f450d7db4d9fe61365f064b6650497ee73a
4
- data.tar.gz: 4e23aa9b9fac8e971b0eaa8df7cf87c11ed3a64e590c7092b528d168dad87c50
3
+ metadata.gz: eefcf9d06aa3a9e9baa2fb79ec8be96c0c87d4cc1ffd554954f7aa09774d19a9
4
+ data.tar.gz: '0945b30932e4c27f08502e741126cdd4ca494da36d3dc285993bed2106896916'
5
5
  SHA512:
6
- metadata.gz: ae9e2a2ab11e3cf17bbd6dc4e48380e5203ceea4d5221ce8884650203b0675c698364e5f8f6650b7f85308b7722b92c0ad846bdd4b02d52fe15c28d72b726894
7
- data.tar.gz: b7be293b3deb8b842c3e90b9780f1d9d824c88e1f77f4e21c2eeacd39b9236d9c7189b195b9214fd273d6901b7454ef4c12653e1c74c9c8d4de6f16fa2db439c
6
+ metadata.gz: 3fc1b63521d7ebdd1ee92f476ceec2c2f7d9995ba608c7c7400508a069b765e0cf9c0c0db3bfd4426bd15cb9401a8b80b98f587db48c575812caa6b396c19928
7
+ data.tar.gz: 5af8ccd413f26b1775fb748fca101a2944f105d81d09cdbf2a08fb887bbbc505d86db94b571e91928bdc2a55e00a16a81b665ff1fa67e002badfca6a55b43b15
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- revo-loans_api (0.0.10)
4
+ revo-loans_api (0.0.12)
5
5
  activesupport
6
6
  http
7
7
 
data/README.md CHANGED
@@ -448,6 +448,40 @@ result.response # => `{ errors: { mobile_phone: ['error'] } }`
448
448
  ```
449
449
 
450
450
 
451
+ ### Send billing shift confirmation code
452
+
453
+
454
+ ```ruby
455
+ result = client.send_billing_shift_confirmation_code(mobile_phone: '8881234567')
456
+
457
+ # Success:
458
+ result.success? # => true
459
+ result.response # => `nil`
460
+ # Failure:
461
+ result.success? # => false
462
+ result.response # => `{ errors: { mobile_phone: ['error'] } }`
463
+ ```
464
+
465
+
466
+ ### Info about billing shift
467
+
468
+
469
+ ```ruby
470
+ result = client.billing_shift_info(mobile_phone: '8881234567')
471
+ # Success:
472
+ result.success? # => true
473
+ result.response # => =>
474
+ # [
475
+ # { billing_chain: 4, date: '2020-02-26' },
476
+ # { billing_chain: 1, date: '2020-03-02' },
477
+ # { billing_chain: 2, date: '2020-03-10' }
478
+ # ]
479
+ # Failure:
480
+ result.success? # => false
481
+ result.response # => `{ errors: { mobile_phone: ['error'] } }`
482
+ ```
483
+
484
+
451
485
  ### Possible Exceptions
452
486
 
453
487
  In case of generic HTTP errors (i.e. server is not reachable or network is down), `Revo::LoansApi::UnexpectedResponseError` will be raised.
@@ -150,6 +150,14 @@ 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)
155
+ end
156
+
157
+ def billing_shift_info(mobile_phone:)
158
+ make_request(:get, "clients/billing_shift/info?mobile_phone=#{mobile_phone}")
159
+ end
160
+
153
161
  private
154
162
 
155
163
  API_CONTENT_TYPE = 'application/json'.freeze
@@ -1,5 +1,5 @@
1
1
  module Revo
2
2
  module LoansApi
3
- VERSION = '0.0.11'.freeze
3
+ VERSION = '0.0.12'.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.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Revo Developers
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-12-27 00:00:00.000000000 Z
11
+ date: 2020-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http