revo-loans_api 0.0.14 → 0.0.15
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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +18 -4
- data/lib/revo/loans_api/client.rb +9 -4
- data/lib/revo/loans_api/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9a352b4dc6274898a60d03e04dad9229ed7d48e674e0c8e72111270f2db43ca
|
4
|
+
data.tar.gz: dc7bf6f9ab3f58a520a0446825ae734a836ffd9fd910cc87e67176fcd9a9fec4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5576d216c82c88dd27b3ffbce6b4f598037b709f8772f3528a84988655b1f0737f5000ad6c31009f8ae706dc4473c69bf84c483ae42cd0e0128337c449bd58c
|
7
|
+
data.tar.gz: 432a0226694c8b0a8924157fe0942a1d20bc2b3f6b763aabaf8a9865a1d7d92a244c361473a94c3d94e2b93904f5ad01846f438258339e2cfb0b4797766ba497
|
data/Gemfile.lock
CHANGED
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(
|
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: {
|
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(
|
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: {
|
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(
|
154
|
-
make_request(:post,
|
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(
|
158
|
-
make_request(:get, "clients/billing_shift/info
|
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:)
|