File tree Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -555,17 +555,17 @@ public function campaignStatByReferrals($id)
555
555
/**
556
556
* Create new campaign
557
557
*
558
- * @param $senderName
559
- * @param $senderEmail
560
- * @param $subject
561
- * @param $bodyOrTemplateId
562
- * @param $bookId
558
+ * @param $senderName
559
+ * @param $senderEmail
560
+ * @param $subject
561
+ * @param $bodyOrTemplateId
562
+ * @param $bookId
563
563
* @param string $name
564
564
* @param string $attachments
565
565
* @param string $type
566
566
* @param bool $useTemplateId
567
567
* @param string $sendDate
568
- *
568
+ * @param int|null $segmentId
569
569
* @return mixed
570
570
*/
571
571
public function createCampaign (
@@ -578,7 +578,8 @@ public function createCampaign(
578
578
$ attachments = '' ,
579
579
$ type = '' ,
580
580
$ useTemplateId = false ,
581
- $ sendDate = ''
581
+ $ sendDate = '' ,
582
+ $ segmentId = null
582
583
)
583
584
{
584
585
if (empty ($ senderName ) || empty ($ senderEmail ) || empty ($ subject ) || empty ($ bodyOrTemplateId ) || empty ($ bookId )) {
@@ -608,10 +609,14 @@ public function createCampaign(
608
609
'type ' => $ type ,
609
610
);
610
611
611
- if (!empty ($ sendDate )){
612
+ if (!empty ($ sendDate )) {
612
613
$ data ['send_date ' ] = $ sendDate ;
613
614
}
614
615
616
+ if (!empty ($ segmentId )) {
617
+ $ data ['segment_id ' ] = $ segmentId ;
618
+ }
619
+
615
620
$ requestResult = $ this ->sendRequest ('campaigns ' , 'POST ' , $ data );
616
621
617
622
return $ this ->handleResult ($ requestResult );
You can’t perform that action at this time.
0 commit comments