Class: HubSpotSDK::Resources::Marketing::SingleSend

Inherits:
Object
  • Object
show all
Defined in:
lib/hubspot_sdk/resources/marketing/single_send.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ SingleSend

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 SingleSend.

Parameters:



41
42
43
# File 'lib/hubspot_sdk/resources/marketing/single_send.rb', line 41

def initialize(client:)
  @client = client
end

Instance Method Details

#create(contact_properties:, custom_properties:, email_id:, message:, request_options: {}) ⇒ HubSpotSDK::Models::Marketing::EmailSendStatusView

Some parameter documentations has been truncated, see Models::Marketing::SingleSendCreateParams for more details.

Send a template email to a specific recipient.

Parameters:

  • contact_properties (Hash{Symbol=>String})

    The contactProperties field is a map of contact property values. Each contact pr

  • custom_properties (Hash{Symbol=>Object})

    The customProperties field is a map of property values. Each property value cont

  • email_id (Integer)

    The content ID for the email, which can be found in email tool UI.

  • message (HubSpotSDK::Models::Marketing::PublicSingleSendEmail)
  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



27
28
29
30
31
32
33
34
35
36
# File 'lib/hubspot_sdk/resources/marketing/single_send.rb', line 27

def create(params)
  parsed, options = HubSpotSDK::Marketing::SingleSendCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "marketing/email-campaigns/2026-03/single-send",
    body: parsed,
    model: HubSpotSDK::Marketing::EmailSendStatusView,
    options: options
  )
end