Class: Hubspot::CustomEvent
- Inherits:
-
Object
- Object
- Hubspot::CustomEvent
- Defined in:
- lib/hubspot/custom_event.rb
Overview
HubSpot Custom Behavioral Events HTTP API
Constant Summary collapse
- POST_EVENT_PATH =
'/events/v3/send'
Class Method Summary collapse
Class Method Details
.trigger(event_name, email, properties, options = {}) ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/hubspot/custom_event.rb', line 13 def trigger(event_name, email, properties, = {}) [:params] ||= {} [:body] ||= {} [:body].merge!( eventName: "#{Hubspot::Config.custom_event_prefix}_#{event_name}", email: email, properties: properties ) Hubspot::CustomEventConnection.trigger(POST_EVENT_PATH, ).success? end |