CRM V2

SingleOptin extends CrmClientModel
in package

This class allows to handle single optins

Tags
throws
ApiErrorException

If an error occurs

throws
CrmException

If the CRM encounters an error

category

Api Models

subpackage

models

Table of Contents

$validation  : array<string|int, mixed>
Validation rules
setStatus()  : bool
Set the single optin status for an email

Properties

$validation

Validation rules

protected static array<string|int, mixed> $validation = ['email' => 'required|email:rfc,dns,spoof,filter', 'opt_in' => 'required|bool']

Methods

setStatus()

Set the single optin status for an email

public static setStatus(string $email, bool $opt_in) : bool
Parameters
$email : string
$opt_in : bool
Tags
throws
ApiErrorException

ApiError::singleOptinCustomerExists If single optin already exists

Return values
bool —

true if succeeded

Search results