Method: OEHClient::Realtime::Event.post
- Defined in:
- lib/oehclient/realtime/event.rb
.post(site_key, uri, properties = {}) ⇒ Object
class-level wrapper to post a new interaction to the OEH server using either the realtime or offline API for an anonymous or known prospects/customer
26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/oehclient/realtime/event.rb', line 26 def self.post(site_key, uri, properties={}) # setup the baseline attributes hash with the site_key and interaction URI, which are the # minimal values needed for an interaction attributes = {:sk => site_key,:uri => uri} # create a new interaction using all attributes pass new_event = OEHClient::Realtime::Event.new(attributes) # Send the interaction for processing and return the instance of the interaction class new_event.send(properties) end |