|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Inspirum\Balikobot\Model\Values\Package; |
|
4
|
|
|
|
|
5
|
|
|
use Inspirum\Balikobot\Definitions\Option; |
|
6
|
|
|
|
|
7
|
|
|
trait NotificationData |
|
8
|
|
|
{ |
|
9
|
|
|
/** |
|
10
|
|
|
* Set the item at a given offset |
|
11
|
|
|
* |
|
12
|
|
|
* @param string $key |
|
13
|
|
|
* @param mixed $value |
|
14
|
|
|
* |
|
15
|
|
|
* @return void |
|
16
|
|
|
*/ |
|
17
|
|
|
abstract public function offsetSet($key, $value); |
|
18
|
|
|
|
|
19
|
|
|
/** |
|
20
|
|
|
* @param bool $notification |
|
21
|
|
|
* |
|
22
|
|
|
* @return void |
|
23
|
|
|
*/ |
|
24
|
1 |
|
public function setSmsNotification(bool $notification = true): void |
|
25
|
|
|
{ |
|
26
|
1 |
|
$this->offsetSet(Option::SMS_NOTIFICATION, (int) $notification); |
|
27
|
1 |
|
} |
|
28
|
|
|
|
|
29
|
|
|
/** |
|
30
|
|
|
* @param bool $phoneDeliveryNotification |
|
31
|
|
|
* |
|
32
|
|
|
* @return void |
|
33
|
|
|
*/ |
|
34
|
1 |
|
public function setPhoneDeliveryNotification(bool $phoneDeliveryNotification = true): void |
|
35
|
|
|
{ |
|
36
|
1 |
|
$this->offsetSet(Option::PHONE_DELIVERY_NOTIFICATION, (int) $phoneDeliveryNotification); |
|
37
|
1 |
|
} |
|
38
|
|
|
|
|
39
|
|
|
/** |
|
40
|
|
|
* @param bool $phoneOrderNotification |
|
41
|
|
|
* |
|
42
|
|
|
* @return void |
|
43
|
|
|
*/ |
|
44
|
1 |
|
public function setPhoneOrderNotification(bool $phoneOrderNotification = true): void |
|
45
|
|
|
{ |
|
46
|
1 |
|
$this->offsetSet(Option::PHONE_ORDER_NOTIFICATION, (int) $phoneOrderNotification); |
|
47
|
1 |
|
} |
|
48
|
|
|
|
|
49
|
|
|
/** |
|
50
|
|
|
* @param bool $emailNotification |
|
51
|
|
|
* |
|
52
|
|
|
* @return void |
|
53
|
|
|
*/ |
|
54
|
1 |
|
public function setEmailNotification(bool $emailNotification = true): void |
|
55
|
|
|
{ |
|
56
|
1 |
|
$this->offsetSet(Option::EMAIL_NOTIFICATION, (int) $emailNotification); |
|
57
|
1 |
|
} |
|
58
|
|
|
|
|
59
|
|
|
/** |
|
60
|
|
|
* @param bool $phoneNotification |
|
61
|
|
|
* |
|
62
|
|
|
* @return void |
|
63
|
|
|
*/ |
|
64
|
1 |
|
public function setPhoneNotification(bool $phoneNotification = true): void |
|
65
|
|
|
{ |
|
66
|
1 |
|
$this->offsetSet(Option::PHONE_NOTIFICATION, (int) $phoneNotification); |
|
67
|
1 |
|
} |
|
68
|
|
|
|
|
69
|
|
|
/** |
|
70
|
|
|
* @param bool $b2cNotification |
|
71
|
|
|
* |
|
72
|
|
|
* @return void |
|
73
|
|
|
*/ |
|
74
|
1 |
|
public function setB2CNotification(bool $b2cNotification = true): void |
|
75
|
|
|
{ |
|
76
|
1 |
|
$this->offsetSet(Option::B2C_NOTIFICATION, (int) $b2cNotification); |
|
77
|
1 |
|
} |
|
78
|
|
|
|
|
79
|
|
|
/** |
|
80
|
|
|
* @param string $reference |
|
81
|
|
|
* |
|
82
|
|
|
* @return void |
|
83
|
|
|
*/ |
|
84
|
1 |
|
public function setReference(string $reference): void |
|
85
|
|
|
{ |
|
86
|
1 |
|
$this->offsetSet(Option::REFERENCE, $reference); |
|
87
|
1 |
|
} |
|
88
|
|
|
|
|
89
|
|
|
/** |
|
90
|
|
|
* @param bool $service |
|
91
|
|
|
* |
|
92
|
|
|
* @return void |
|
93
|
|
|
*/ |
|
94
|
1 |
|
public function setSM1Service(bool $service = true): void |
|
95
|
|
|
{ |
|
96
|
1 |
|
$this->offsetSet(Option::SM1_SERVICE, (int) $service); |
|
97
|
1 |
|
} |
|
98
|
|
|
|
|
99
|
|
|
/** |
|
100
|
|
|
* @param string $text |
|
101
|
|
|
* |
|
102
|
|
|
* @return void |
|
103
|
|
|
*/ |
|
104
|
1 |
|
public function setSM1Text(string $text): void |
|
105
|
|
|
{ |
|
106
|
1 |
|
$this->offsetSet(Option::SM1_TEXT, $text); |
|
107
|
1 |
|
} |
|
108
|
|
|
|
|
109
|
|
|
/** |
|
110
|
|
|
* @param bool $service |
|
111
|
|
|
* |
|
112
|
|
|
* @return void |
|
113
|
|
|
*/ |
|
114
|
1 |
|
public function setSM2Service(bool $service = true): void |
|
115
|
|
|
{ |
|
116
|
1 |
|
$this->offsetSet(Option::SM2_SERVICE, (int) $service); |
|
117
|
1 |
|
} |
|
118
|
|
|
} |
|
119
|
|
|
|