Skip to content

Commit

Permalink
Merge pull request #59 from sendpulse/add_date_params
Browse files Browse the repository at this point in the history
add sendDate for createCampaign
  • Loading branch information
bilovol authored Aug 26, 2020
2 parents 7593389 + 1b20a86 commit d1d7c4e
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 d1d7c4e

Please sign in to comment.