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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +34 -0
- data/lib/revo/loans_api/client.rb +8 -0
- data/lib/revo/loans_api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eefcf9d06aa3a9e9baa2fb79ec8be96c0c87d4cc1ffd554954f7aa09774d19a9
|
4
|
+
data.tar.gz: '0945b30932e4c27f08502e741126cdd4ca494da36d3dc285993bed2106896916'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3fc1b63521d7ebdd1ee92f476ceec2c2f7d9995ba608c7c7400508a069b765e0cf9c0c0db3bfd4426bd15cb9401a8b80b98f587db48c575812caa6b396c19928
|
7
|
+
data.tar.gz: 5af8ccd413f26b1775fb748fca101a2944f105d81d09cdbf2a08fb887bbbc505d86db94b571e91928bdc2a55e00a16a81b665ff1fa67e002badfca6a55b43b15
|
data/Gemfile.lock
CHANGED
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
|
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.
|
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:
|
11
|
+
date: 2020-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http
|