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)
555555 /**
556556 * Create new campaign
557557 *
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
563563 * @param string $name
564564 * @param string $attachments
565565 * @param string $type
566566 * @param bool $useTemplateId
567567 * @param string $sendDate
568- *
568+ * @param int|null $segmentId
569569 * @return mixed
570570 */
571571 public function createCampaign (
@@ -578,7 +578,8 @@ public function createCampaign(
578578 $ attachments = '' ,
579579 $ type = '' ,
580580 $ useTemplateId = false ,
581- $ sendDate = ''
581+ $ sendDate = '' ,
582+ $ segmentId = null
582583 )
583584 {
584585 if (empty ($ senderName ) || empty ($ senderEmail ) || empty ($ subject ) || empty ($ bodyOrTemplateId ) || empty ($ bookId )) {
@@ -608,10 +609,14 @@ public function createCampaign(
608609 'type ' => $ type ,
609610 );
610611
611- if (!empty ($ sendDate )){
612+ if (!empty ($ sendDate )) {
612613 $ data ['send_date ' ] = $ sendDate ;
613614 }
614615
616+ if (!empty ($ segmentId )) {
617+ $ data ['segment_id ' ] = $ segmentId ;
618+ }
619+
615620 $ requestResult = $ this ->sendRequest ('campaigns ' , 'POST ' , $ data );
616621
617622 return $ this ->handleResult ($ requestResult );
You can’t perform that action at this time.
0 commit comments