class PersonService extends BaseService (View source)

The list manager class used to handle lists.

Methods

__construct(KlaviyoApi $api)

The constructor for the list manager class.

static 
create(KlaviyoApi $api)

Instantiates a new instance of this class.

string
getResourcePath($resource)

Retrieve the full resource path.

getPerson(string $id)

Retrieve a person from the Klaviyo API.

Details

in BaseService at line line 28
__construct(KlaviyoApi $api)

The constructor for the list manager class.

Parameters

KlaviyoApi $api The Klaviyo API object to use for communicating with the Klaviyo API.

in BaseService at line line 35
static create(KlaviyoApi $api)

Instantiates a new instance of this class.

Parameters

KlaviyoApi $api

in BaseService at line line 46
string getResourcePath($resource)

Retrieve the full resource path.

Parameters

$resource

Return Value

string The full resource path incuding the resource prefix and resource path. Example: /api/v1/lists

at line line 21
PersonModel getPerson(string $id)

Retrieve a person from the Klaviyo API.

Parameters

string $id The id of the person that should be retrieved.

Return Value

PersonModel The person model object if it exists in Klaviyo.