Skip to content

Commit e3e5a2e

Browse files
committed
Add new attributes ampTemplate and ampTemplateUrl
1 parent 5209974 commit e3e5a2e

File tree

3 files changed

+86
-9
lines changed

3 files changed

+86
-9
lines changed

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ $data = [
128128
"automaticTime" => false,
129129
"recipientsListId" => 1,
130130
"templateUrl" => "http://example.org/newsletter.html",
131+
"ampTemplateUrl" => "http://example.org/ampNewsletter.html",
131132
"unsubscribeTemplateUrl" => "http://example.org/unsubscribe.html"
132133
];
133134
$newsletter = new \MailQ\Entities\v2\NewsletterEntity($data);
@@ -150,6 +151,7 @@ $data = [
150151
"text" => "TmV3c2xldHRlciwgbmV3c2xldHRlciwgbmV3c2xldHRlciwgbmV3c2xldHRlciwgbmV3c2xldHRlciwgbmV3c2xldHRlciwgbmV3c2xldHRlciwgbmV3c2xldHRlciwgbmV3c2xldHRlciwgbmV3c2xldHRlciwgbmV3c2xldHRlciwgbmV3c2xldHRlciwgbmV3c2xldHRlciwgbmV3c2xldHRlciwgbmV3c2xldHRlciwgbmV3c2xldHRlciw=",
151152
"automaticTime" => false,
152153
"templateUrl" => "http://example.org/newsletter.html",
154+
"ampTemplateUrl" => "http://example.org/ampNewsletter.html",
153155
"unsubscribeTemplateUrl" => "http://example.org/unsubscribe.html"
154156
];
155157
$newsletter = new \MailQ\Entities\v2\NewsletterEntity($data);
@@ -204,6 +206,7 @@ $data = [
204206
"sendAs" => "Awesome Company",
205207
"text" => "QWx0ZXJuYXRpdmUgYmFzZTY0IGVtYWlsIHRleHQ=",
206208
"template" => "QWx0ZXJuYXRpdmUgYmFzZTY0IGVtYWlsIHRleHQ=",
209+
"ampTemplate" => "QWx0ZXJuYXRpdmUgYmFzZTY0IGVtYWlsIHRleHQ=",
207210
"appliedSenderEmail" => "[email protected]"
208211
];
209212
$notification = new \MailQ\Entities\v2\NotificationEntity($data);
@@ -215,12 +218,14 @@ $notificationId = $notification->getId();
215218

216219
```php
217220
$data = [
221+
"id" => 1,
218222
"name" => "First Notification",
219223
"code" => "N1",
220224
"subject" => "{{orderNumber}} order is ready",
221225
"sendAs" => "Awesome Company",
222226
"text" => "QWx0ZXJuYXRpdmUgYmFzZTY0IGVtYWlsIHRleHQ=",
223227
"template" => "QWx0ZXJuYXRpdmUgYmFzZTY0IGVtYWlsIHRleHQ=",
228+
"ampTemplate" => "QWx0ZXJuYXRpdmUgYmFzZTY0IGVtYWlsIHRleHQ=",
224229
"appliedSenderEmail" => "[email protected]"
225230
];
226231
$notification = new \MailQ\Entities\v2\NotificationEntity($data);

src/MailQ/Entities/v2/NewsletterEntity.php

+53-9
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
* @property string $csvUrl
2424
* @property string $templateUrl
2525
* @property string $template
26+
* @property string $ampTemplateUrl
27+
* @property string $ampTemplate
2628
* @property string $tags
2729
* @property string $unsubscribeTemplateUrl
2830
* @property LinkEntity $company
@@ -156,6 +158,20 @@ class NewsletterEntity extends BaseEntity {
156158
*/
157159
private $template;
158160

161+
/**
162+
* @in
163+
* @out
164+
* @var string
165+
*/
166+
private $ampTemplateUrl;
167+
168+
/**
169+
* @in
170+
* @out
171+
* @var string
172+
*/
173+
private $ampTemplate;
174+
159175
/**
160176
* @in
161177
* @out
@@ -504,6 +520,24 @@ public function setTemplateUrl($templateUrl)
504520
return $this;
505521
}
506522

523+
/**
524+
* @return string
525+
*/
526+
public function getAmpTemplateUrl()
527+
{
528+
return $this->ampTemplateUrl;
529+
}
530+
531+
/**
532+
* @param string $ampTemplateUrl
533+
* @return NewsletterEntity
534+
*/
535+
public function setAmpTemplateUrl($ampTemplateUrl)
536+
{
537+
$this->ampTemplateUrl = $ampTemplateUrl;
538+
return $this;
539+
}
540+
507541
/**
508542
* @return string
509543
*/
@@ -594,6 +628,25 @@ public function setTemplate($template)
594628
return $this;
595629
}
596630

631+
/**
632+
* @return string
633+
*/
634+
public function getAmpTemplate()
635+
{
636+
return $this->ampTemplate;
637+
}
638+
639+
/**
640+
* @param string $ampTemplate
641+
* @return NewsletterEntity
642+
*/
643+
public function setAmpTemplate($ampTemplate)
644+
{
645+
$this->ampTemplate = $ampTemplate;
646+
return $this;
647+
}
648+
649+
597650
/**
598651
* @return string
599652
*/
@@ -612,13 +665,4 @@ public function setTags($tags)
612665
return $this;
613666
}
614667

615-
616-
617-
618-
619-
620-
621-
622-
623-
624668
}

src/MailQ/Entities/v2/NotificationEntity.php

+28
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* @property string $appliedSenderEmail
1414
* @property string $text
1515
* @property string $template
16+
* @property string $ampTemplate
1617
* @property string $status
1718
* @property LinkEntity $company
1819
*/
@@ -75,6 +76,13 @@ class NotificationEntity extends BaseEntity
7576
*/
7677
private $template;
7778

79+
/**
80+
* @in
81+
* @out
82+
* @var string
83+
*/
84+
private $ampTemplate;
85+
7886
/**
7987
* @in
8088
* @out
@@ -233,6 +241,26 @@ public function setTemplate($template)
233241
return $this;
234242
}
235243

244+
/**
245+
* @return string
246+
*/
247+
public function getAmpTemplate()
248+
{
249+
return $this->ampTemplate;
250+
}
251+
252+
/**
253+
* @param $ampTemplate
254+
* @return NotificationEntity
255+
*/
256+
public function setAmpTemplate($ampTemplate)
257+
{
258+
$this->ampTemplate = $ampTemplate;
259+
return $this;
260+
}
261+
262+
263+
236264
/**
237265
* @return string
238266
*/

0 commit comments

Comments
 (0)