-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathtest_verification_api.rb
More file actions
32 lines (27 loc) · 1.09 KB
/
test_verification_api.rb
File metadata and controls
32 lines (27 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
require "sift"
class VerificationAPI
@@client = Sift::Client.new(:api_key => ENV["API_KEY"], :version => 1.1)
def send()
properties = {
"$user_id" => $user_id,
"$send_to" => $user_email,
"$verification_type" => "$email",
"$brand_name" => "MyTopBrand",
"$language" => "en",
"$site_country" => "IN",
"$event" => {
"$session_id" => "SOME_SESSION_ID",
"$verified_event" => "$login",
"$verified_entity_id" => "SOME_SESSION_ID",
"$reason" => "$automated_rule",
"$ip" => "192.168.1.1",
"$browser" => {
"$user_agent" => "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
"$accept_language" => "en-US",
"$content_language" => "en-GB"
}
}
}
return @@client.verification_send(properties)
end
end