Skip to content

Commit 8f380f9

Browse files
메시지 조회 기능 추가
1 parent a67e780 commit 8f380f9

5 files changed

Lines changed: 367 additions & 4 deletions

File tree

src/Models/Kakao/KakaoOption.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class KakaoOption
3535
/**
3636
* @var array 메시지 버튼 목록
3737
*/
38-
public $buttons = array();
38+
public $buttons;
3939

4040
/**
4141
* @return string

src/Models/Message.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,26 @@ class Message
4141
*/
4242
public $kakaoOptions;
4343

44+
/**
45+
* @var string
46+
*/
47+
public $messageId;
48+
49+
/**
50+
* @var string
51+
*/
52+
public $groupId;
53+
54+
/**
55+
* @var string
56+
*/
57+
public $type;
58+
59+
/**
60+
* @var bool
61+
*/
62+
public $autoTypeDetect;
63+
4464
/**
4565
* @return string
4666
*/
Lines changed: 283 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,283 @@
1+
<?php
2+
3+
namespace Nurigo\Solapi\Models\Request;
4+
5+
class GetMessagesRequest
6+
{
7+
8+
/**
9+
* @var string
10+
*/
11+
public $startKey;
12+
13+
/**
14+
* @var int
15+
*/
16+
public $limit;
17+
18+
/**
19+
* @var string
20+
*/
21+
public $messageId;
22+
23+
/**
24+
* @var string[]
25+
*/
26+
public $messageIds;
27+
28+
/**
29+
* @var string
30+
*/
31+
public $groupId;
32+
33+
/**
34+
* @var string
35+
*/
36+
public $to;
37+
38+
/**
39+
* @var string
40+
*/
41+
public $from;
42+
43+
/**
44+
* @var string
45+
*/
46+
public $type;
47+
48+
/**
49+
* @var string
50+
*/
51+
public $statusCode;
52+
53+
/**
54+
* @var string CREATED|UPDATED
55+
*/
56+
public $dateType = 'CREATED';
57+
58+
/**
59+
* @var string
60+
*/
61+
public $startDate;
62+
63+
/**
64+
* @var string
65+
*/
66+
public $endDate;
67+
68+
/**
69+
* @return string
70+
*/
71+
public function getStartKey(): string
72+
{
73+
return $this->startKey;
74+
}
75+
76+
/**
77+
* @param string $startKey
78+
* @return GetMessagesRequest
79+
*/
80+
public function setStartKey(string $startKey): GetMessagesRequest
81+
{
82+
$this->startKey = $startKey;
83+
return $this;
84+
}
85+
86+
/**
87+
* @return int
88+
*/
89+
public function getLimit(): int
90+
{
91+
return $this->limit;
92+
}
93+
94+
/**
95+
* @param int $limit
96+
* @return GetMessagesRequest
97+
*/
98+
public function setLimit(int $limit): GetMessagesRequest
99+
{
100+
$this->limit = $limit;
101+
return $this;
102+
}
103+
104+
/**
105+
* @return string
106+
*/
107+
public function getMessageId(): string
108+
{
109+
return $this->messageId;
110+
}
111+
112+
/**
113+
* @param string $messageId
114+
* @return GetMessagesRequest
115+
*/
116+
public function setMessageId(string $messageId): GetMessagesRequest
117+
{
118+
$this->messageId = $messageId;
119+
return $this;
120+
}
121+
122+
/**
123+
* @return string[]
124+
*/
125+
public function getMessageIds(): array
126+
{
127+
return $this->messageIds;
128+
}
129+
130+
/**
131+
* @param string[] $messageIds
132+
* @return GetMessagesRequest
133+
*/
134+
public function setMessageIds(array $messageIds): GetMessagesRequest
135+
{
136+
$this->messageIds = $messageIds;
137+
return $this;
138+
}
139+
140+
/**
141+
* @return string
142+
*/
143+
public function getGroupId(): string
144+
{
145+
return $this->groupId;
146+
}
147+
148+
/**
149+
* @param string $groupId
150+
* @return GetMessagesRequest
151+
*/
152+
public function setGroupId(string $groupId): GetMessagesRequest
153+
{
154+
$this->groupId = $groupId;
155+
return $this;
156+
}
157+
158+
/**
159+
* @return string
160+
*/
161+
public function getTo(): string
162+
{
163+
return $this->to;
164+
}
165+
166+
/**
167+
* @param string $to
168+
* @return GetMessagesRequest
169+
*/
170+
public function setTo(string $to): GetMessagesRequest
171+
{
172+
$this->to = $to;
173+
return $this;
174+
}
175+
176+
/**
177+
* @return string
178+
*/
179+
public function getFrom(): string
180+
{
181+
return $this->from;
182+
}
183+
184+
/**
185+
* @param string $from
186+
* @return GetMessagesRequest
187+
*/
188+
public function setFrom(string $from): GetMessagesRequest
189+
{
190+
$this->from = $from;
191+
return $this;
192+
}
193+
194+
/**
195+
* @return string
196+
*/
197+
public function getType(): string
198+
{
199+
return $this->type;
200+
}
201+
202+
/**
203+
* @param string $type
204+
* @return GetMessagesRequest
205+
*/
206+
public function setType(string $type): GetMessagesRequest
207+
{
208+
$this->type = $type;
209+
return $this;
210+
}
211+
212+
/**
213+
* @return string
214+
*/
215+
public function getStatusCode(): string
216+
{
217+
return $this->statusCode;
218+
}
219+
220+
/**
221+
* @param string $statusCode
222+
* @return GetMessagesRequest
223+
*/
224+
public function setStatusCode(string $statusCode): GetMessagesRequest
225+
{
226+
$this->statusCode = $statusCode;
227+
return $this;
228+
}
229+
230+
/**
231+
* @return string
232+
*/
233+
public function getDateType(): string
234+
{
235+
return $this->dateType;
236+
}
237+
238+
/**
239+
* @param string $dateType
240+
* @return GetMessagesRequest
241+
*/
242+
public function setDateType(string $dateType): GetMessagesRequest
243+
{
244+
$this->dateType = $dateType;
245+
return $this;
246+
}
247+
248+
/**
249+
* @return string
250+
*/
251+
public function getStartDate(): string
252+
{
253+
return $this->startDate;
254+
}
255+
256+
/**
257+
* @param string $startDate
258+
* @return GetMessagesRequest
259+
*/
260+
public function setStartDate(string $startDate): GetMessagesRequest
261+
{
262+
$this->startDate = $startDate;
263+
return $this;
264+
}
265+
266+
/**
267+
* @return string
268+
*/
269+
public function getEndDate(): string
270+
{
271+
return $this->endDate;
272+
}
273+
274+
/**
275+
* @param string $endDate
276+
* @return GetMessagesRequest
277+
*/
278+
public function setEndDate(string $endDate): GetMessagesRequest
279+
{
280+
$this->endDate = $endDate;
281+
return $this;
282+
}
283+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?php
2+
3+
namespace Nurigo\Solapi\Models\Response;
4+
5+
use Nurigo\Solapi\Models\Message;
6+
7+
class GetMessagesResponse
8+
{
9+
/**
10+
* @var int
11+
*/
12+
public $limit;
13+
14+
/**
15+
* @var Message[]
16+
*/
17+
public $messageList;
18+
19+
/**
20+
* @var string
21+
*/
22+
public $startKey;
23+
24+
/**
25+
* @var string
26+
*/
27+
public $nextKey;
28+
29+
30+
/**
31+
* @param mixed $value
32+
*/
33+
public function __construct($value)
34+
{
35+
$this->limit = $value->limit;
36+
$this->messageList = $value->messageList;
37+
$this->startKey = $value->startKey;
38+
$this->nextKey = $value->nextKey;
39+
}
40+
}

0 commit comments

Comments
 (0)