ums 연동 테스트

This commit is contained in:
Rinjae
2025-11-05 13:16:21 +09:00
parent 1928579717
commit fd1110e986
@@ -35,6 +35,8 @@ import java.util.function.BiConsumer;
@Slf4j
public class KjbUmsService {
public final static int[] ALLOW_CHANNELS = { MessageCode.Channels.KAKAO_ALIMTALK.getValue() };
private final static String SEND_URL = "/ums/openapi/send";
private final static String CONTENT_TYPE = "application/json; charset=utf-8";
private final static String AUTHORIZATION_FMT = "Bearer %s";
@@ -69,6 +71,17 @@ public class KjbUmsService {
this.property = property;
}
public static boolean isAllowChannel(MessageRequest message) {
for (int channel : ALLOW_CHANNELS) {
if ((message.getMessageCode().getChannels() & channel) == channel) {
return true;
}
}
return false;
}
public boolean send(MessageRequest messageRequest) {
if (messageRequest == null) {
throw new IllegalArgumentException("messageRequest is null");