Skip to content

Commit d1d7c4e

Browse files
authored
Merge pull request #59 from sendpulse/add_date_params
add sendDate for createCampaign
2 parents 7593389 + 1b20a86 commit d1d7c4e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/ApiClient.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,7 @@ public function campaignStatByReferrals($id)
564564
* @param string $attachments
565565
* @param string $type
566566
* @param bool $useTemplateId
567+
* @param string $sendDate
567568
*
568569
* @return mixed
569570
*/
@@ -576,7 +577,8 @@ public function createCampaign(
576577
$name = '',
577578
$attachments = '',
578579
$type = '',
579-
$useTemplateId = false
580+
$useTemplateId = false,
581+
$sendDate = ''
580582
)
581583
{
582584
if (empty($senderName) || empty($senderEmail) || empty($subject) || empty($bodyOrTemplateId) || empty($bookId)) {
@@ -606,6 +608,10 @@ public function createCampaign(
606608
'type' => $type,
607609
);
608610

611+
if(!empty($sendDate)){
612+
$data['send_date'] = $sendDate;
613+
}
614+
609615
$requestResult = $this->sendRequest('campaigns', 'POST', $data);
610616

611617
return $this->handleResult($requestResult);

0 commit comments

Comments
 (0)