Class: Biro::CredDefense::Request
Instance Method Summary
collapse
Methods inherited from BaseRequest
#initialize, #url
Instance Method Details
#development_url ⇒ Object
11
12
13
|
# File 'lib/biro/gateways/cred_defense/request.rb', line 11
def development_url
'https://test.creddefense.com/index.php/api/v2'
end
|
#find(document) ⇒ Object
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/biro/gateways/cred_defense/request.rb', line 19
def find(document)
params = {
authentication: { token: token },
advancedsearch: { identifier_code: document }
}
begin
response = RestClient.post(search_path, params.to_json, )
Response.new(response)
rescue => e
Biro.log(:warn, "Unable to process CredDefense request")
raise "Error at CredDefense request: #{e.message}"
end
end
|
#production_url ⇒ Object
7
8
9
|
# File 'lib/biro/gateways/cred_defense/request.rb', line 7
def production_url
'https://www.creddefense.com/index.php/api/v2'
end
|
#required_params ⇒ Object
15
16
17
|
# File 'lib/biro/gateways/cred_defense/request.rb', line 15
def required_params
[:username, :password]
end
|