SingleOptin
extends ClientModel
in package
AbstractYes
This class allows to handle single opt in
Tags
Table of Contents
Properties
- $validation : array<string|int, mixed>
- Validation rules
Methods
- setStatus() : bool
- Set the single opt in status for an email
- unsetStatusWithHashcode() : bool
- Unset the single opt in for a hashcode (unsubscribe)
Properties
$validation
Validation rules
protected
static array<string|int, mixed>
$validation
= ['email' => 'required|email', 'hashcode' => 'required|string|size:36', 'opt_in' => 'required|bool']
Methods
setStatus()
Set the single opt in status for an email
public
static setStatus(string $email, bool $opt_in) : bool
Parameters
- $email : string
- $opt_in : bool
Tags
Return values
bool —true if succeeded
unsetStatusWithHashcode()
Unset the single opt in for a hashcode (unsubscribe)
public
static unsetStatusWithHashcode(string $hashcode) : bool
Parameters
- $hashcode : string
Tags
Return values
bool —true if succeeded