smartwaiver 0.0.3 → 0.0.4

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.
Files changed (2) hide show
  1. data/lib/smartwaiver.rb +8 -3
  2. 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
- return @agent.request( "&rest_waiverid=#{u(waiver_id)}" )
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
- def hashed_credential( unique_id = "" )
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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smartwaiver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: