Skip to content

Commit 2528cb7

Browse files
committed
Removed support for tariffs
1 parent 9e91a58 commit 2528cb7

File tree

6 files changed

+2
-46
lines changed

6 files changed

+2
-46
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ All notable changes to `CMSMS` will be documented in this file
99
#### Added
1010
- Added config value for encoding detection type
1111
- Two events for success and failure: `SMSSentSuccessfullyEvent` and `SMSSendingFailedEvent`
12+
#### Removed
13+
- Removed `tariff` support
1214

1315
## [3.3.0] - 2024-03-22
1416
#### Added

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ public function routeNotificationForCmsms()
105105
- `body('')`: Accepts a string value for the message body.
106106
- `originator('')`: Accepts a string value between 1 and 11 characters, used as the message sender name.
107107
- `reference('')`: Accepts a string value for your message reference. This information will be returned in a status report so you can match the message and it's status. Restrictions: 1 - 32 alphanumeric characters. Reference will not work for demo accounts.
108-
- `tariff()`: Accepts a integer value for your message tariff. The unit is eurocent. Requires the `originator` to be set to a specific value. Contact CM for this tariff value. CM also must enable this feature for your contract manually.
109108
- `multipart($minimum, $maximum)`: Accepts a 0 to 8 integer range which allows multipart messages. See the [documentation from CM](https://dashboard.onlinesmsgateway.com/docs#send-a-message-multipart) for more information.
110109

111110
### Available events

src/CmsmsClient.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ public function buildMessageJson(CmsmsMessage $message, string $recipient): stri
8989
'authentication' => [
9090
'productToken' => $this->productToken,
9191
],
92-
'tariff' => $message->getTariff(),
9392
'msg' => [[
9493
'body' => $body,
9594
'to' => [[

src/CmsmsMessage.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ class CmsmsMessage
1212

1313
protected string $reference = '';
1414

15-
protected int $tariff = 0;
16-
1715
protected ?int $minimumNumberOfMessageParts = null;
1816

1917
protected ?int $maximumNumberOfMessageParts = null;
@@ -68,18 +66,6 @@ public function getReference(): string
6866
return $this->reference;
6967
}
7068

71-
public function tariff(int $tariff): self
72-
{
73-
$this->tariff = $tariff;
74-
75-
return $this;
76-
}
77-
78-
public function getTariff(): int
79-
{
80-
return $this->tariff;
81-
}
82-
8369
public function multipart(int $minimum, int $maximum): self
8470
{
8571
if ($maximum > 8 || $minimum >= $maximum) {

tests/CmsmsClientTest.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -83,20 +83,6 @@ public function it_throws_exception_on_error_response()
8383
$this->client->send($this->message, '00301234');
8484
}
8585

86-
/** @test */
87-
public function it_includes_tariff_data()
88-
{
89-
$message = clone $this->message;
90-
$message->tariff(20);
91-
92-
$messageJson = $this->client->buildMessageJson($message, '00301234');
93-
94-
$messageJsonObject = json_decode($messageJson);
95-
96-
$this->assertTrue(isset($messageJsonObject->messages->tariff));
97-
$this->assertEquals(20, $messageJsonObject->messages->tariff);
98-
}
99-
10086
/** @test */
10187
public function it_includes_multipart_data()
10288
{

tests/CmsmsMessageTest.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -97,22 +97,6 @@ public function it_cannot_set_a_reference_that_contains_non_alpha_numeric_values
9797
CmsmsMessage::create()->reference('@#$*A*Sjks87');
9898
}
9999

100-
/** @test */
101-
public function it_can_set_tariff()
102-
{
103-
$message = CmsmsMessage::create()->tariff(12);
104-
105-
$this->assertEquals(12, $message->getTariff());
106-
}
107-
108-
/** @test */
109-
public function it_can_set_an_empty_tariff()
110-
{
111-
$message = CmsmsMessage::create()->tariff(0);
112-
113-
$this->assertEquals(0, $message->getTariff());
114-
}
115-
116100
public function it_can_set_multipart()
117101
{
118102
$message = CmsmsMessage::create()->multipart(1, 4);

0 commit comments

Comments
 (0)