Properties

$configuration

$configuration : \ElasticEmailClient\ApiConfiguration

Type

\ElasticEmailClient\ApiConfiguration — ApiConfiguration

$httpClient

$httpClient : \GuzzleHttp\ClientInterface

Type

\GuzzleHttp\ClientInterface

Methods

__construct()

__construct(\ElasticEmailClient\ApiConfiguration  $apiConfiguration) 

Parameters

\ElasticEmailClient\ApiConfiguration $apiConfiguration

setHttpClient()

setHttpClient(  $client) 

Parameters

$client

getHttpClient()

getHttpClient() : \GuzzleHttp\ClientInterface

Returns

\GuzzleHttp\ClientInterface

setConfiguration()

setConfiguration(\ElasticEmailClient\ApiConfiguration  $config) : $this

Parameters

\ElasticEmailClient\ApiConfiguration $config

Returns

$this

getConfiguration()

getConfiguration() : \ElasticEmailClient\ApiConfiguration

Returns

\ElasticEmailClient\ApiConfiguration

Add()

Add(string  $segmentName, string  $rule) : \ElasticEmailEnums\Segment

Create new segment, based on specified RULE.

Parameters

string $segmentName

Name of your segment.

string $rule

Query used for filtering.

Returns

\ElasticEmailEnums\Segment

EECopy()

EECopy(string  $sourceSegmentName, string  $newSegmentName = null, string  $rule = null) : \ElasticEmailEnums\Segment

Copy your existing Segment with the optional new rule and custom name

Parameters

string $sourceSegmentName

The name of the segment you want to copy

string $newSegmentName

New name of your segment if you want to change it.

string $rule

Query used for filtering.

Returns

\ElasticEmailEnums\Segment

EEDelete()

EEDelete(string  $segmentName) 

Delete existing segment.

Parameters

string $segmentName

Name of your segment.

Export()

Export(string  $segmentName, \ElasticEmailEnums\ExportFileFormats  $fileFormat = \ElasticEmailEnums\ExportFileFormats::Csv, \ElasticEmailEnums\CompressionFormat  $compressionFormat = \ElasticEmailEnums\CompressionFormat::None, string  $fileName = null) : \ElasticEmailEnums\ExportLink

Exports all the contacts from the provided segment

Parameters

string $segmentName

Name of your segment.

\ElasticEmailEnums\ExportFileFormats $fileFormat

Format of the exported file

\ElasticEmailEnums\CompressionFormat $compressionFormat

FileResponse compression format. None or Zip.

string $fileName

Name of your file.

Returns

\ElasticEmailEnums\ExportLink

EEList()

EEList(boolean  $includeHistory = false, \ElasticEmailApi\?DateTime  $from = null, \ElasticEmailApi\?DateTime  $to = null) : \ElasticEmailApi\Array<\ElasticEmailEnums\Segment>

Lists all your available Segments

Parameters

boolean $includeHistory

True: Include history of last 30 days. Otherwise, false.

\ElasticEmailApi\?DateTime $from

From what date should the segment history be shown. In YYYY-MM-DDThh:mm:ss format.

\ElasticEmailApi\?DateTime $to

To what date should the segment history be shown. In YYYY-MM-DDThh:mm:ss format.

Returns

\ElasticEmailApi\Array<\ElasticEmailEnums\Segment>

LoadByName()

LoadByName(\ElasticEmailApi\array<string>  $segmentNames, boolean  $includeHistory = false, \ElasticEmailApi\?DateTime  $from = null, \ElasticEmailApi\?DateTime  $to = null) : \ElasticEmailApi\Array<\ElasticEmailEnums\Segment>

Lists your available Segments using the provided names

Parameters

\ElasticEmailApi\array $segmentNames

Names of segments you want to load. Will load all contacts if left empty or the 'All Contacts' name has been provided

boolean $includeHistory

True: Include history of last 30 days. Otherwise, false.

\ElasticEmailApi\?DateTime $from

From what date should the segment history be shown. In YYYY-MM-DDThh:mm:ss format.

\ElasticEmailApi\?DateTime $to

To what date should the segment history be shown. In YYYY-MM-DDThh:mm:ss format.

Returns

\ElasticEmailApi\Array<\ElasticEmailEnums\Segment>

Update()

Update(string  $segmentName, string  $newSegmentName = null, string  $rule = null) : \ElasticEmailEnums\Segment

Rename or change RULE for your segment

Parameters

string $segmentName

Name of your segment.

string $newSegmentName

New name of your segment if you want to change it.

string $rule

Query used for filtering.

Returns

\ElasticEmailEnums\Segment

sendRequest()

sendRequest(string  $url, array  $data = array(), string  $method = 'POST', array  $attachments = array()) : \Psr\Http\Message\ResponseInterface

Parameters

string $url
array $data
string $method
array $attachments

Throws

\Exception

Returns

\Psr\Http\Message\ResponseInterface

parseMultipart()

parseMultipart(array  $attachments, array  $params) : array

Parameters

array $attachments
array $params

Returns

array