Class: Trolley::VerificationGateway
- Inherits:
-
Object
- Object
- Trolley::VerificationGateway
- Defined in:
- lib/trolley/gateways/VerificationGateway.rb
Instance Method Summary collapse
- #expire(body) ⇒ Object
-
#initialize(client) ⇒ VerificationGateway
constructor
A new instance of VerificationGateway.
- #search(filters = {}) ⇒ Object (also: #all)
- #trigger(verification_type, body) ⇒ Object
- #trigger_watchlist(body) ⇒ Object
Constructor Details
#initialize(client) ⇒ VerificationGateway
Returns a new instance of VerificationGateway.
8 9 10 |
# File 'lib/trolley/gateways/VerificationGateway.rb', line 8 def initialize(client) @client = client end |
Instance Method Details
#expire(body) ⇒ Object
22 23 24 |
# File 'lib/trolley/gateways/VerificationGateway.rb', line 22 def expire(body) verification_list_builder(@client.patch('/v1/verifications/expire', body)) end |
#search(filters = {}) ⇒ Object Also known as: all
12 13 14 15 16 17 18 |
# File 'lib/trolley/gateways/VerificationGateway.rb', line 12 def search(filters = {}) path = '/v1/verifications' query_string = URI.encode_www_form(filters) path = "#{path}?#{query_string}" unless query_string.empty? verification_list_builder(@client.get(path)) end |
#trigger(verification_type, body) ⇒ Object
26 27 28 |
# File 'lib/trolley/gateways/VerificationGateway.rb', line 26 def trigger(verification_type, body) verification_list_builder(@client.post("/v1/verifications/#{verification_type}/trigger", body)) end |
#trigger_watchlist(body) ⇒ Object
30 31 32 |
# File 'lib/trolley/gateways/VerificationGateway.rb', line 30 def trigger_watchlist(body) verification_list_builder(@client.post('/v1/verifications/watchlist/trigger', body)) end |