Interface KitClient

All Known Implementing Classes:
KitClientMain

public interface KitClient
Port for outbound Kit.com API calls.

Implementations live in the endurancetrio-app module so that the business module remains free of web/HTTP dependencies.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addSubscriberToForm(Long subscriberId, String formId)
    Adds an already-created subscriber to a Kit.com form, triggering the double opt-in e-mail configured on that form.
    Creates or updates a subscriber in Kit.com and returns their subscriber ID.
  • Method Details

    • addSubscriberToForm

      void addSubscriberToForm(Long subscriberId, String formId) throws EnduranceTrioException
      Adds an already-created subscriber to a Kit.com form, triggering the double opt-in e-mail configured on that form.
      Parameters:
      subscriberId - the Kit.com subscriber ID
      formId - the Kit.com form ID
      Throws:
      EnduranceTrioException - if the API call fails
    • createOrUpdateSubscriber

      Long createOrUpdateSubscriber(NewsletterSubscriptionDTO dto) throws EnduranceTrioException
      Creates or updates a subscriber in Kit.com and returns their subscriber ID.
      Parameters:
      dto - the subscriber's first name and e-mail address
      Returns:
      the Kit.com subscriber ID
      Throws:
      EnduranceTrioException - if the API call fails