EmailTemplatesInterface
in
Interface EmailTemplatesInterface.
Table of Contents
- create() : ResponseInterface
- Create an email template by name.
- get() : ResponseInterface
- Get an email template by name.
- patch() : ResponseInterface
- Patch an email template by name.
- update() : ResponseInterface
- Update an email template by name.
Methods
create()
Create an email template by name.
public
create(string $template, string $body, string $from, string $subject, string $syntax, bool $enabled[, array<string|int, string>|null $additional = null ][, RequestOptions|null $options = null ]) : ResponseInterface
See docs @see below for valid names and fields.
Required scope: create:email_templates
.
Parameters
- $template : string
-
The template name. See the @see for a list of templates available.
- $body : string
-
body of the email template
- $from : string
-
senders from email address
- $subject : string
-
subject line of the email
- $syntax : string
-
syntax of the template body
- $enabled : bool
-
whether the template is enabled (true) or disabled (false)
- $additional : array<string|int, string>|null = null
-
Additional body content to pass with the API request. See @see for supported options.
- $options : RequestOptions|null = null
-
Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)
Tags
Return values
ResponseInterface —get()
Get an email template by name.
public
get(string $templateName[, RequestOptions|null $options = null ]) : ResponseInterface
See docs @see below for valid names and fields.
Required scope: read:email_templates
.
Parameters
- $templateName : string
-
The email template name. See the @see for a list of templates available.
- $options : RequestOptions|null = null
-
Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)
Tags
Return values
ResponseInterface —patch()
Patch an email template by name.
public
patch(string $templateName, array<string|int, mixed> $body[, RequestOptions|null $options = null ]) : ResponseInterface
This will update only the email template data fields provided (see HTTP PATCH).
See docs @see below for valid names, fields, and possible responses.
Required scope: update:email_templates
.
Parameters
- $templateName : string
-
The email template name. See the @see for a list of templates available.
- $body : array<string|int, mixed>
-
update existing template fields with this data
- $options : RequestOptions|null = null
-
Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)
Tags
Return values
ResponseInterface —update()
Update an email template by name.
public
update(string $templateName, array<string|int, mixed> $body[, RequestOptions|null $options = null ]) : ResponseInterface
This will replace the email template data.
See docs @see below for valid names, fields, and possible responses.
Required scope: update:email_templates
.
Parameters
- $templateName : string
-
The email template name. See the @see for a list of templates available.
- $body : array<string|int, mixed>
-
replace existing template with this data
- $options : RequestOptions|null = null
-
Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)