Skip to content

Commit

Permalink
add sendDate for createCampaign
Browse files Browse the repository at this point in the history
  • Loading branch information
bilovol committed Aug 26, 2020
1 parent 7593389 commit 1b20a86
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/ApiClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,7 @@ public function campaignStatByReferrals($id)
* @param string $attachments
* @param string $type
* @param bool $useTemplateId
* @param string $sendDate
*
* @return mixed
*/
Expand All @@ -576,7 +577,8 @@ public function createCampaign(
$name = '',
$attachments = '',
$type = '',
$useTemplateId = false
$useTemplateId = false,
$sendDate = ''
)
{
if (empty($senderName) || empty($senderEmail) || empty($subject) || empty($bodyOrTemplateId) || empty($bookId)) {
Expand Down Expand Up @@ -606,6 +608,10 @@ public function createCampaign(
'type' => $type,
);

if(!empty($sendDate)){
$data['send_date'] = $sendDate;
}

$requestResult = $this->sendRequest('campaigns', 'POST', $data);

return $this->handleResult($requestResult);
Expand Down

0 comments on commit 1b20a86

Please sign in to comment.