@@ -25,168 +25,125 @@ public function __construct(array $options = [])
2525 $ this ->options = $ options ;
2626 }
2727
28- public function getCreatedDatetime (): ?string
29- {
30- return $ this ->options ['created_datetime ' ] ?? null ;
31- }
32-
33- public function getDataCoding (): ?string
34- {
35- return $ this ->options ['data_coding ' ] ?? null ;
36- }
37-
38- public function getFrom (): ?string
39- {
40- return $ this ->options ['from ' ] ?? null ;
41- }
42-
43- public function getGateway (): ?int
44- {
45- return $ this ->options ['gateway ' ] ?? null ;
46- }
47-
48- public function getGroupIds (): ?array
49- {
50- return $ this ->options ['group_ids ' ] ?? null ;
51- }
52-
53- public function getMClass (): ?int
54- {
55- return $ this ->options ['m_class ' ] ?? null ;
56- }
57-
5828 public function getRecipientId (): ?string
5929 {
60- return $ this ->options ['recipient_id ' ] ?? null ;
61- }
62-
63- public function getReference (): ?string
64- {
65- return $ this ->options ['reference ' ] ?? null ;
66- }
67-
68- public function getReportUrl (): ?string
69- {
70- return $ this ->options ['report_url ' ] ?? null ;
71- }
72-
73- public function getScheduledDatetime (): ?string
74- {
75- return $ this ->options ['scheduled_datetime ' ] ?? null ;
30+ return null ;
7631 }
7732
78- public function getShortenUrls (): ?bool
33+ /**
34+ * @return $this
35+ */
36+ public function createdDatetime (string $ createdDatetime ): static
7937 {
80- return $ this ->options ['shorten_urls ' ] ?? null ;
81- }
82-
83- public function getType (): ?string
84- {
85- return $ this ->options ['type ' ] ?? null ;
86- }
87-
88- public function getTypeDetails (): ?string
89- {
90- return $ this ->options ['type_details ' ] ?? null ;
91- }
92-
93- public function getValidity (): ?int
94- {
95- return $ this ->options ['validity ' ] ?? null ;
96- }
97-
98- public function setCreatedDatetime (string $ createdDatetime ): self
99- {
100- $ this ->options ['created_datetime ' ] = $ createdDatetime ;
101-
102- return $ this ;
103- }
104-
105- public function setDataCoding (string $ dataCoding ): self
106- {
107- $ this ->options ['data_coding ' ] = $ dataCoding ;
38+ $ this ->options ['createdDatetime ' ] = $ createdDatetime ;
10839
10940 return $ this ;
11041 }
11142
112- public function setFrom (string $ from ): self
43+ /**
44+ * @return $this
45+ */
46+ public function dataCoding (string $ dataCoding ): static
11347 {
114- $ this ->options ['from ' ] = $ from ;
48+ $ this ->options ['dataCoding ' ] = $ dataCoding ;
11549
11650 return $ this ;
11751 }
11852
119- public function setGateway (int $ gateway ): self
53+ /**
54+ * @return $this
55+ */
56+ public function gateway (int $ gateway ): static
12057 {
12158 $ this ->options ['gateway ' ] = $ gateway ;
12259
12360 return $ this ;
12461 }
12562
126- public function setGroupIds (array $ groupIds ): self
63+ /**
64+ * @return $this
65+ */
66+ public function groupIds (array $ groupIds ): static
12767 {
128- $ this ->options ['group_ids ' ] = $ groupIds ;
68+ $ this ->options ['groupIds ' ] = $ groupIds ;
12969
13070 return $ this ;
13171 }
13272
133- public function setMClass (int $ mClass ): self
73+ /**
74+ * @return $this
75+ */
76+ public function mClass (int $ mClass ): static
13477 {
135- $ this ->options ['m_class ' ] = $ mClass ;
78+ $ this ->options ['mClass ' ] = $ mClass ;
13679
13780 return $ this ;
13881 }
13982
140- public function setRecipientId (string $ id ): self
141- {
142- $ this ->options ['recipient_id ' ] = $ id ;
143-
144- return $ this ;
145- }
146-
147- public function setReference (string $ reference ): self
83+ /**
84+ * @return $this
85+ */
86+ public function reference (string $ reference ): static
14887 {
14988 $ this ->options ['reference ' ] = $ reference ;
15089
15190 return $ this ;
15291 }
15392
154- public function setReportUrl (string $ reportUrl ): self
93+ /**
94+ * @return $this
95+ */
96+ public function reportUrl (string $ reportUrl ): static
15597 {
156- $ this ->options ['report_url ' ] = $ reportUrl ;
98+ $ this ->options ['reportUrl ' ] = $ reportUrl ;
15799
158100 return $ this ;
159101 }
160102
161- public function setScheduledDatetime (string $ scheduledDatetime ): self
103+ /**
104+ * @return $this
105+ */
106+ public function scheduledDatetime (string $ scheduledDatetime ): static
162107 {
163- $ this ->options ['scheduled_datetime ' ] = $ scheduledDatetime ;
108+ $ this ->options ['scheduledDatetime ' ] = $ scheduledDatetime ;
164109
165110 return $ this ;
166111 }
167112
168- public function setShortenUrls (bool $ shortenUrls ): self
113+ /**
114+ * @return $this
115+ */
116+ public function shortenUrls (bool $ shortenUrls ): static
169117 {
170- $ this ->options ['shorten_urls ' ] = $ shortenUrls ;
118+ $ this ->options ['shortenUrls ' ] = $ shortenUrls ;
171119
172120 return $ this ;
173121 }
174122
175- public function setType (string $ type ): self
123+ /**
124+ * @return $this
125+ */
126+ public function type (string $ type ): static
176127 {
177128 $ this ->options ['type ' ] = $ type ;
178129
179130 return $ this ;
180131 }
181132
182- public function setTypeDetails (string $ typeDetails ): self
133+ /**
134+ * @return $this
135+ */
136+ public function typeDetails (string $ typeDetails ): static
183137 {
184- $ this ->options ['type_details ' ] = $ typeDetails ;
138+ $ this ->options ['typeDetails ' ] = $ typeDetails ;
185139
186140 return $ this ;
187141 }
188142
189- public function setValidity (int $ validity ): self
143+ /**
144+ * @return $this
145+ */
146+ public function validity (int $ validity ): static
190147 {
191148 $ this ->options ['validity ' ] = $ validity ;
192149
@@ -195,11 +152,6 @@ public function setValidity(int $validity): self
195152
196153 public function toArray (): array
197154 {
198- $ options = $ this ->options ;
199- if (isset ($ options ['recipient_id ' ])) {
200- unset($ options ['recipient_id ' ]);
201- }
202-
203- return $ options ;
155+ return $ this ->options ;
204156 }
205157}
0 commit comments