revo-loans_api 0.0.4 → 0.0.7
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 +22 -0
- data/lib/revo/loans_api/client.rb +12 -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: 42037b1b0b7a36cd1e24c0bcae6a3c530704fb9e0c1d7391badd901b78d49a0e
|
4
|
+
data.tar.gz: '04967e25561ba10bfc5a963e2377e23bf65a822ebfdd38ede6f07605652da9e3'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e35433067f7cf5c10af3e1e59e6a1be1012d392255d2ff6369102bdace33ffe0a2ab6d2cf290b8ad616170d8d5be4c3d85e9dcaa11225d0e62c96ae26cf223f
|
7
|
+
data.tar.gz: a8b81f6be52bda5d1902664a75846bd348ece0f15777060aea7de532ba804b87ad72c82e47b33e0461160f48f7191c7d5bf74acc605d2adff4c0794c89758447
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -425,6 +425,28 @@ result.response # =>
|
|
425
425
|
# }
|
426
426
|
```
|
427
427
|
|
428
|
+
### Patch client data
|
429
|
+
|
430
|
+
|
431
|
+
```ruby
|
432
|
+
result = client.update_client(
|
433
|
+
id: '123', # use the one you got when creating a client
|
434
|
+
client_params: {
|
435
|
+
mobile_phone: '8881234567',
|
436
|
+
email: 'user@example.com'
|
437
|
+
}
|
438
|
+
}
|
439
|
+
)
|
440
|
+
|
441
|
+
# Success:
|
442
|
+
result.success? # => true
|
443
|
+
result.response # => `nil`
|
444
|
+
|
445
|
+
# Failure:
|
446
|
+
result.success? # => false
|
447
|
+
result.response # => `{ errors: { mobile_phone: ['error'] } }`
|
448
|
+
```
|
449
|
+
|
428
450
|
|
429
451
|
### Possible Exceptions
|
430
452
|
|
@@ -124,6 +124,18 @@ class Revo::LoansApi::Client
|
|
124
124
|
client: client_params, provider_data: provider_data)
|
125
125
|
end
|
126
126
|
|
127
|
+
def update_client(id:, client_params:)
|
128
|
+
make_request(:patch, "/clients/#{id}", client: client_params)
|
129
|
+
end
|
130
|
+
|
131
|
+
def create_virtual_card(token:)
|
132
|
+
make_request(:post, "loan_requests/#{token}/virtual_card")
|
133
|
+
end
|
134
|
+
|
135
|
+
def create_card_loan(token:, term_id:)
|
136
|
+
make_request(:post, "loan_requests/#{token}/card_loan", term_id: term_id)
|
137
|
+
end
|
138
|
+
|
127
139
|
private
|
128
140
|
|
129
141
|
attr_reader :connection, :base_url, :login, :password
|
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.7
|
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-
|
11
|
+
date: 2019-12-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http
|