class TemplateService extends BaseService (View source)

The template manager class used to handle templates.

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.

updateTemplate(TemplateModel $template)

Update the specified template.

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 22
TemplateModel updateTemplate(TemplateModel $template)

Update the specified template.

Parameters

TemplateModel $template The template object to update.

Return Value

TemplateModel The updated template object.