smartwaiver 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/smartwaiver.rb +8 -3
- metadata +1 -1
data/lib/smartwaiver.rb
CHANGED
@@ -19,7 +19,9 @@ module Smartwaiver
|
|
19
19
|
# @param [String] waiver_id ID of waiver to retrieve, eg "21"
|
20
20
|
def self.get_waiver( waiver_id )
|
21
21
|
@agent = Agent.new(@@api_key, @@api_version, false, @@base_url)
|
22
|
-
|
22
|
+
|
23
|
+
require 'open-uri'
|
24
|
+
return @agent.request( "&rest_waiverid=#{URI::encode(waiver_id)}" )
|
23
25
|
end
|
24
26
|
|
25
27
|
# Retrieves list of waiver types from the Smartwaiver API.
|
@@ -37,8 +39,11 @@ module Smartwaiver
|
|
37
39
|
@agent = Agent.new(@@api_key, @@api_version, false, @@base_url)
|
38
40
|
return @agent.download_pdf( pdf_url )
|
39
41
|
end
|
40
|
-
|
41
|
-
|
42
|
+
|
43
|
+
# Verify credentials from webhook
|
44
|
+
#
|
45
|
+
# @param [String] unique_id Unique ID for an event, which is verified by hashing, eg "5176c8b298d9f"
|
46
|
+
def self.hashed_credential( unique_id = "" )
|
42
47
|
return Digest::MD5.hexdigest( @@api_key + unique_id )
|
43
48
|
end
|
44
49
|
|