package com.eactive.ext.kjb.obp;

import com.google.gson.JsonObject;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;

import java.util.Arrays;
import java.util.stream.Collectors;

@Slf4j
public class KjbObpModule {
    /**
     * Trim, 숫자이외 자동 치환
     * @param bizNo
     * @return
     */
    public static JsonObject queryOrganization(String bizNo) {
        bizNo = ObpUtil.onlyDigit(bizNo);

        if (StringUtils.isEmpty(bizNo)) {
            throw new IllegalArgumentException("BizNo is not empty.");
        }

        if (bizNo.length() != 10) {
            throw new IllegalArgumentException("BizNo is not valid.");
        }

        return null;
    }


    public static void main(String[] args) {
        log.info("queryOrganization Test");
        queryOrganization("123asd123asd123");
    }
}
