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.verify; 017 018import com.fasterxml.jackson.annotation.JsonProperty; 019import com.vonage.client.JsonableBaseObject; 020import java.util.Date; 021 022public class VerifyCheck extends JsonableBaseObject { 023 private final Date date; 024 private final String code; 025 private final Status status; 026 027 public VerifyCheck(@JsonProperty("date_received") Date date, 028 @JsonProperty("code") String code, 029 @JsonProperty("status") Status status) { 030 this.date = date; 031 this.code = code; 032 this.status = status; 033 } 034 035 public enum Status { 036 VALID, INVALID 037 } 038 039 /** 040 * @return The date and time this check was received 041 */ 042 public Date getDate() { 043 return date; 044 } 045 046 /** 047 * @return The code supplied with this check request. 048 */ 049 public String getCode() { 050 return code; 051 } 052 053 public Status getStatus() { 054 return status; 055 } 056}