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 fraud score insight results in {@link FraudCheckResponse#getFraudScore()}. 023 */ 024public class FraudScore extends JsonableBaseObject { 025 private Integer riskScore; 026 private RiskRecommendation riskRecommendation; 027 private RiskLabel label; 028 private FraudScoreStatus status; 029 030 protected FraudScore() {} 031 032 /** 033 * Score derived from evaluating fraud-related data associated with the phone number. This ranges from 0-100, with 0 meaning least risk and 100 meaning highest risk. 034 * 035 * @return The risk score as an Integer between 0 and 100. 036 */ 037 @JsonProperty("risk_score") 038 public Integer getRiskScore() { 039 return riskScore; 040 } 041 042 /** 043 * Recommended action based on the risk score. 044 * 045 * @return The recommendation as an enum. 046 */ 047 @JsonProperty("risk_recommendation") 048 public RiskRecommendation getRiskRecommendation() { 049 return riskRecommendation; 050 } 051 052 /** 053 * Mapping of risk score to a verbose description. 054 * 055 * @return The risk label as an enum. 056 */ 057 @JsonProperty("label") 058 public RiskLabel getLabel() { 059 return label; 060 } 061 062 /** 063 * Status of the fraud score API call. 064 * 065 * @return The insight status as an enum. 066 */ 067 @JsonProperty("status") 068 public FraudScoreStatus getStatus() { 069 return status; 070 } 071}