From 9a7381bf8652a53ad63ff815f9f32bb19a2b199e Mon Sep 17 00:00:00 2001 From: Olle Gustafsson Date: Mon, 28 Nov 2022 16:34:11 +0100 Subject: [PATCH 1/2] Fix optional request parameters * Only "message" is allowed according 46elks API Reference * renamed method and parameter name to match 46elks --- src/FortySixElksSMS.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FortySixElksSMS.php b/src/FortySixElksSMS.php index 60f36ae..fd97f17 100644 --- a/src/FortySixElksSMS.php +++ b/src/FortySixElksSMS.php @@ -12,7 +12,7 @@ class FortySixElksSMS extends FortySixElksMedia implements FortySixElksMediaInte protected $flash = 'no'; protected $dry = 'no'; protected $whendelivered = null; - protected $log = false; + protected $log = null; /** * FortySixElksSMS constructor. From e7195f9c777c2392c751134512168fea3fd2d7f0 Mon Sep 17 00:00:00 2001 From: Olle Gustafsson Date: Mon, 28 Nov 2022 16:51:32 +0100 Subject: [PATCH 2/2] Rename dryrun and dontlog to match 46elks API Ref. --- src/FortySixElksSMS.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/FortySixElksSMS.php b/src/FortySixElksSMS.php index fd97f17..c44c2a6 100644 --- a/src/FortySixElksSMS.php +++ b/src/FortySixElksSMS.php @@ -10,9 +10,9 @@ class FortySixElksSMS extends FortySixElksMedia implements FortySixElksMediaInte public $type = 'SMS'; protected $flash = 'no'; - protected $dry = 'no'; + protected $dryrun = 'no'; protected $whendelivered = null; - protected $log = null; + protected $dontlog = null; /** * FortySixElksSMS constructor. @@ -34,9 +34,9 @@ public function send() 'message' => $this->getContent(), 'to' => $this->phone_number, 'flashsms' => $this->flash, - 'dryrun' => $this->dry, + 'dryrun' => $this->dryrun, 'whendelivered' => $this->whendelivered, - 'dontlog' => $this->log, + 'dontlog' => $this->dontlog, ], ]); @@ -65,9 +65,9 @@ public function flash() /** * @return $this */ - public function dry() + public function dryrun() { - $this->dry = $this->payload['dryrun'] ?? 'yes'; + $this->dryrun = $this->payload['dryrun'] ?? 'yes'; return $this; } @@ -87,9 +87,9 @@ public function whendelivered($url) /** * @return $this */ - public function dontLog() + public function dontlog() { - $this->log = $this->payload['dontLog'] ?? 'message'; + $this->dontlog = $this->payload['dontlog'] ?? 'message'; return $this; }