# ActualReasonEnum.java

    package cloud.wconnect.finance.cons.chargeback;

    import cloud.wconnect.finance.cons.ta.TaRecordsStatusEnum;
    import lombok.AllArgsConstructor;
    import lombok.Getter;

    import java.util.Arrays;
    import java.util.Objects;
    import java.util.Optional;

    @Getter
    @AllArgsConstructor
    public enum ActualReasonEnum {

        WRONG_RATE("Wrong Rate", "chargeback.actualReason.wrongRate"),

        OVERCHARGE("Overcharge", "chargeback.actualReason.overcharge"),

        EARLY_CHECK_OUT("Early Check-In / Late Check out", "chargeback.actualReason.earlyCheckOut"),

        DUPLICATE_RESERVATION("Duplicate Reservation", "chargeback.actualReason.duplicateReservation"),

        WRONG_PAYMENT_METHOD("Wrong Payment Method", "chargeback.actualReason.wrongPaymentMethod"),

        CUSTOMER_COMPLAINT("Customer Complaint", "chargeback.actualReason.customerComplaint"),

        NO_SHOW_CANCELLATION("No-Show / Cancellation", "chargeback.actualReason.noShow"),

        PENALTY_FINE_OTHER_FEE("Penalty / Fine / Other Fee", "chargeback.actualReason.penaltyFineOtherFee"),

        CREDIT_CARD_FRAUD("Credit Card Fraud","chargeback.actualReason.creditCardFraud"),

        NO_AUTHORIZE("No Authorize", "chargeback.actualReason.noAuthorize");

        private final String code;

        private final String i18nCode;

        public static String getI18nCode(String code) {
            Optional<ActualReasonEnum> optional = Arrays.stream(ActualReasonEnum.values())
                    .filter(item -> Objects.equals(item.getCode(), code)).findFirst();
            return optional.isPresent() ? optional.get().getI18nCode() : "";
        }

    }