Class: HubSpotSDK::Resources::Events::Send

Inherits:
Object
  • Object
show all
Defined in:
lib/hubspot_sdk/resources/events/send.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Send

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Send.

Parameters:



68
69
70
# File 'lib/hubspot_sdk/resources/events/send.rb', line 68

def initialize(client:)
  @client = client
end

Instance Method Details

#batch_send(inputs:, request_options: {}) ⇒ nil

Send multiple event occurrences at once.

Parameters:

Returns:

  • (nil)

See Also:



17
18
19
20
21
22
23
24
25
26
# File 'lib/hubspot_sdk/resources/events/send.rb', line 17

def batch_send(params)
  parsed, options = HubSpotSDK::Events::SendBatchSendParams.dump_request(params)
  @client.request(
    method: :post,
    path: "events/2026-03/send/batch",
    body: parsed,
    model: NilClass,
    options: options
  )
end

#send_(event_name:, properties:, email: nil, object_id_: nil, occurred_at: nil, utk: nil, uuid: nil, request_options: {}) ⇒ nil

Some parameter documentations has been truncated, see Models::Events::SendSendParams for more details.

Send data for a single custom event occurrence.

Parameters:

  • event_name (String)

    Internal name of the event-type to trigger

  • properties (Hash{Symbol=>String})

    Map of properties for the event in the format property internal name - property

  • email (String)

    Email of visitor

  • object_id_ (String)

    The object id that this event occurred on. Could be a contact id or a visitor id

  • occurred_at (Time)

    The time when this event occurred (if any). If this isn’t set, the current time

  • utk (String)

    User token

  • uuid (String)
  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

  • (nil)

See Also:



54
55
56
57
58
59
60
61
62
63
# File 'lib/hubspot_sdk/resources/events/send.rb', line 54

def send_(params)
  parsed, options = HubSpotSDK::Events::SendSendParams.dump_request(params)
  @client.request(
    method: :post,
    path: "events/2026-03/send",
    body: parsed,
    model: NilClass,
    options: options
  )
end