Interface NewsletterService
- All Known Implementing Classes:
NewsletterServiceMain
public interface NewsletterService
Service for managing newsletter subscriptions via Kit.com.
-
Method Summary
Modifier and TypeMethodDescriptionvoidsubscribe(NewsletterSubscriptionDTO dto, String language) Subscribes the given subscriber to the Kit.com form that corresponds to the requested language.
-
Method Details
-
subscribe
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 viaPOST /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 addresslanguage- the page language code ("en"or"pt") used to select the correct Kit.com form- Throws:
EnduranceTrioException- if the subscription fails
-