Class: HubSpotSDK::Resources::Marketing::Transactional::SingleEmail

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

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ SingleEmail

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

Parameters:



45
46
47
# File 'lib/hubspot_sdk/resources/marketing/transactional/single_email.rb', line 45

def initialize(client:)
  @client = client
end

Instance Method Details

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

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

Asynchronously send a transactional email. Returns the status of the email send with a statusId that can be used to continuously query for the status using the Email Send Status API.

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:



31
32
33
34
35
36
37
38
39
40
# File 'lib/hubspot_sdk/resources/marketing/transactional/single_email.rb', line 31

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