lib/i2x/cashier.rb in i2x-0.0.4 vs lib/i2x/cashier.rb in i2x-0.0.5

- old
+ new

@@ -11,25 +11,22 @@ ## # = Verify # => Verify if items have already been seen in the past (on the cache). # # == Params - # - *memory*: the key identifier to be verified + # - *cache*: the key identifier to be verified # - *payload*: the value for matching/verification # - *agent*: the agent performing the verification # - *seed*: seed data (if available) # - def self.verify memory, agent, payload, seed - + def self.verify cache, agent, payload, seed + #puts "[i2x][Cashier] verifying\n\taccess token: #{I2X::Config.access_token}\n\thost: #{I2X::Config.host}\n\tcache: #{cache}\n\tagent: #{agent}\n\tpayload: #{payload}\n\tseed: #{seed}" begin - response = RestClient.post "#{I2X::Config.host}fluxcapacitor/verify.json", {:access_token => I2X::Config.access_token, :agent => agent, :memory => memory, :payload => payload, :seed => seed} + response = RestClient.post "#{I2X::Config.host}fluxcapacitor/verify.json", {:access_token => I2X::Config.access_token, :agent => agent[:identifier], :cache => cache, :payload => payload, :seed => seed} rescue Exception => e response = {:status => 400} end - - - - + p response response end end end \ No newline at end of file