Sha256: b17306289fd3a0c74d3cbed2ed54dfd5f86e4f59e73e8cc2e9ef23b0528c07ce

Contents?: true

Size: 537 Bytes

Versions: 14

Compression:

Stored size: 537 Bytes

Contents

require 'hubspot/utils'

module Hubspot
  #
  # HubSpot Events HTTP API
  #
  # {https://developers.hubspot.com/docs/methods/enterprise_events/http_api}
  #
  class Event
    POST_EVENT_PATH = '/v1/event'

    class << self
      def trigger(event_id, email, options = {})
        default_params = { _n: event_id, _a: Hubspot::Config.portal_id, email: email }
        options[:params] = default_params.merge(options[:params] || {})

        Hubspot::EventConnection.trigger(POST_EVENT_PATH, options).success?
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
hubspot-api-ruby-0.19.0 lib/hubspot/event.rb
hubspot-api-ruby-0.18.0 lib/hubspot/event.rb
hubspot-api-ruby-0.17.1 lib/hubspot/event.rb
hubspot-api-ruby-0.17.0 lib/hubspot/event.rb
hubspot-api-ruby-0.16.0 lib/hubspot/event.rb
hubspot-api-ruby-0.15.0 lib/hubspot/event.rb
hubspot-api-ruby-0.14.0 lib/hubspot/event.rb
hubspot-api-ruby-0.13.0 lib/hubspot/event.rb
hubspot-api-ruby-0.12.0 lib/hubspot/event.rb
hubspot-api-ruby-0.11.0 lib/hubspot/event.rb
hubspot-api-ruby-0.10.0 lib/hubspot/event.rb
hubspot-api-ruby-0.9.0 lib/hubspot/event.rb
hubspot-api-ruby-0.8.1 lib/hubspot/event.rb
hubspot-api-ruby-0.8.0 lib/hubspot/event.rb