smartwaiver 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/smartwaiver.rb +12 -0
- metadata +1 -1
data/lib/smartwaiver.rb
CHANGED
@@ -13,6 +13,14 @@ module Smartwaiver
|
|
13
13
|
@agent = Agent.new(@@api_key, @@api_version, rest_limit, @@base_url)
|
14
14
|
return @agent.request
|
15
15
|
end
|
16
|
+
|
17
|
+
# Retrieves individual waiver from the Smartwaiver API.
|
18
|
+
#
|
19
|
+
# @param [String] waiver_id ID of waiver to retrieve, eg "21"
|
20
|
+
def self.get_waiver( waiver_id )
|
21
|
+
@agent = Agent.new(@@api_key, @@api_version, false, @@base_url)
|
22
|
+
return @agent.request( "&rest_waiverid=#{u(waiver_id)}" )
|
23
|
+
end
|
16
24
|
|
17
25
|
# Retrieves list of waiver types from the Smartwaiver API.
|
18
26
|
#
|
@@ -30,4 +38,8 @@ module Smartwaiver
|
|
30
38
|
return @agent.download_pdf( pdf_url )
|
31
39
|
end
|
32
40
|
|
41
|
+
def hashed_credential( unique_id = "" )
|
42
|
+
return Digest::MD5.hexdigest( @@api_key + unique_id )
|
43
|
+
end
|
44
|
+
|
33
45
|
end
|