CustomerNewsletterService
This service class contains functions used for handling newsletter related tasks.
All public functions are available in the Twig template renderer.
Methods
public __construct($newsletterRepo)
CustomerNewsletterService constructor.
Type |
Name |
Description |
|
Subscribes a single user to a newsletter
Type |
Name |
Description |
|
The email address of the customer |
|
|
Id for the type of newsletter |
|
|
Optional: First name of the customer |
|
|
Optional: Last name of the customer |
Subscribes a single user to multiple newsletters
Type |
Name |
Description |
|
The email address of the customer |
|
|
Ids for the types of newsletters |
|
|
Optional: First name of the customer |
|
|
Optional: Last name of the customer |
public updateOptInStatus($authString, $newsletterEmailId):bool
Type |
Name |
Description |
|
Authorization string used for security purposes |
|
|
Unique id of the newsletter registration |
Delete recipients from the newsletter Not passing the optional parameter $emailFolder deletes the recipient from all email-folders
Type |
Name |
Description |
|
Email of the user |
|
|
Id of the type of newsletter |