Sha256: 1063a9b6e89ff5b994c36a22815c3c0effd520be826bc2fddf54b66a35763f77
Contents?: true
Size: 650 Bytes
Versions: 12
Compression:
Stored size: 650 Bytes
Contents
require 'hubspot/utils' module Hubspot # # HubSpot Custom Behavioral Events HTTP API # # {https://developers.hubspot.com/docs/api/analytics/events} # class CustomEvent POST_EVENT_PATH = '/events/v3/send' class << self def trigger(event_name, email, properties, options = {}) options[:params] ||= {} options[:body] ||= {} options[:body].merge!( eventName: "#{Hubspot::Config.custom_event_prefix}_#{event_name}", email: email, properties: properties ) Hubspot::CustomEventConnection.trigger(POST_EVENT_PATH, options).success? end end end end
Version data entries
12 entries across 12 versions & 1 rubygems