Sha256: ce6a3f8308fa90193e123d36f94bb9d01d1d3ba4ac54016292934daed28c17f5

Contents?: true

Size: 496 Bytes

Versions: 4

Compression:

Stored size: 496 Bytes

Contents

module Services
  module Hubspot
    module Timeline
      class CreateEvent
        def initialize(email, template_id)
          @email = email
          @template_id = template_id
        end

        def call
          timeline_event = ::Hubspot::Crm::Timeline::TimelineEvent.new(
            email: @email,
            event_template_id: @template_id
          )
          ::Hubspot::Crm::Timeline::EventsApi.new.create(timeline_event: timeline_event)
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
hubspot-api-client-9.0.0 sample-apps/timeline-events-app/app/lib/services/hubspot/timeline/create_event.rb
hubspot-api-client-8.0.1 sample-apps/timeline-events-app/app/lib/services/hubspot/timeline/create_event.rb
hubspot-api-client-8.0.0 sample-apps/timeline-events-app/app/lib/services/hubspot/timeline/create_event.rb
hubspot-api-client-7.3.0 sample-apps/timeline-events-app/app/lib/services/hubspot/timeline/create_event.rb