001/*
002 *   Copyright 2024 Vonage
003 *
004 *   Licensed under the Apache License, Version 2.0 (the "License");
005 *   you may not use this file except in compliance with the License.
006 *   You may obtain a copy of the License at
007 *
008 *        http://www.apache.org/licenses/LICENSE-2.0
009 *
010 *   Unless required by applicable law or agreed to in writing, software
011 *   distributed under the License is distributed on an "AS IS" BASIS,
012 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 *   See the License for the specific language governing permissions and
014 *   limitations under the License.
015 */
016package com.vonage.client.numberinsight2;
017
018import com.fasterxml.jackson.annotation.JsonProperty;
019import com.vonage.client.JsonableBaseObject;
020
021/**
022 * Represents the sim swap insight results in {@link FraudCheckResponse#getSimSwap()}.
023 */
024public class SimSwap extends JsonableBaseObject {
025        private SimSwapStatus status;
026        private Boolean swapped;
027        private String reason;
028
029        protected SimSwap() {}
030
031        /**
032         * Status of the sim swap call.
033         * 
034         * @return The insight status as an enum.
035         */
036        @JsonProperty("status")
037        public SimSwapStatus getStatus() {
038                return status;
039        }
040
041        /**
042         * Whether the sim was swapped within the past week. Returned only if the sim swap check succeeds.
043         * 
044         * @return {@code true} if the sim was swapped in the last 7 days, or {@code null} if the check failed.
045         */
046        @JsonProperty("swapped")
047        public Boolean getSwapped() {
048                return swapped;
049        }
050
051        /**
052         * Reason for a sim swap error response. Returned only if the sim swap check fails.
053         * 
054         * @return The error response description, or {@code null} if the call succeeded.
055         */
056        @JsonProperty("reason")
057        public String getReason() {
058                return reason;
059        }
060}