Interface NewsletterService

All Known Implementing Classes:
NewsletterServiceMain

public interface NewsletterService
Service for managing newsletter subscriptions via Kit.com.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Subscribes the given subscriber to the Kit.com form that corresponds to the requested language.
  • Method Details

    • subscribe

      void subscribe(NewsletterSubscriptionDTO dto, String language)
      Subscribes the given subscriber to the Kit.com form that corresponds to the requested language.

      The Kit.com v4 API is called in two steps: first the subscriber is created or updated via POST /v4/subscribers, then the resulting subscriber ID is used to add them to the language-specific form via POST /v4/forms/{form_id}/subscribers/{id}, which triggers the double opt-in confirmation email configured on that form.

      Parameters:
      dto - the subscriber's first name and email address
      language - the page language code ("en" or "pt") used to select the correct Kit.com form
      Throws:
      EnduranceTrioException - if the subscription fails