All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sinch.sdk.domains.verification.models.dto.v1.SimSwapResponseDto Maven / Gradle / Ivy

There is a newer version: 1.4.0
Show newest version
/*
 * Verification
 * Verification REST API for verifying phone numbers and users. Support of FlashCall verification, PIN SMS verification and Callout verification.    **Note:** OTP CODE must be the full valid E.164 number that we called from.    ## Overview    For general information on how to use the Sinch APIs including methods, types, errors and authorization, please check the [Using REST](doc:using-rest) page.  Use the Sinch Verification Service to verify end-user's mobile phone numbers. The Sinch Verification APIs should be used in combination with the Verification SDKs for a complete end-to-end solution, though it is possible to only use the APIs. Currently, there are three verification methods supported:    - FlashCall verification - Android only  - PIN SMS verification - iOS, Android, Javascript  - Callout verification (voice call) - iOS only  - Data verification (distinguished by method = `seamless`) - iOS, Android    #### FlashCall verification    With the flashCall verification method, a user's phone number is verified by triggering a \"missed call\" towards this number. The call is intercepted by the Android SDK in the mobile app and blocked automatically.  To initiate a flashCall verification, check the [Android SDK documentation](doc:verification-android-the-verification-process#flash-call-verification). For additional security, it is recommended that you control which verification requests should proceed and which ones not, by listening in your backend for the [Verification Request Event](doc:verification-rest-verification-api#verification-request) and respond accordingly. Your backend will be notified on the result of the verification with the [Verification Result Event](doc:verification-rest-callback-api#verification-result-event).    #### PIN SMS verification    With the PIN SMS verification method, a user's phone number is verified by sending an SMS containing a PIN code to this number. In the case of iOS or Javascript, the user needs to enter the PIN manually in the app, while for Android there is an option of intercepting the SMS message delivery and capturing the PIN code automatically.  To initiate a PIN SMS verification, check the [iOS](doc:verification-ios-sms-verification), [Android](doc:verification-for-android) and [Javascript](doc:verification-for-javascript) documentation. For additional security, it is recommended that you control which verification requests should proceed and which ones not, by listening in your backend for the [Verification Request Event](doc:verification-rest-verification-api#verification-request) and respond accordingly. Your backend will be notified on the result of the verification with the [Verification Result Event](doc:verification-rest-callback-api#verification-result-event).    #### Callout verification    With the callout verification method, a user's phone number is verified by receiving a phone call and hearing a pre-recorded or text-to-speech message, advising the user to press a digit code. When the user presses the digit code in the dialpad, the verification is successful.  To initiate a callout verification, check the [iOS documentation](doc:verification-ios-callout-verification). For additional security, it is recommended that you control which verification requests should proceed and which ones not, by listening in your backend for the [Verification Request Event](doc:verification-rest-verification-api#verification-request) and respond accordingly. Your backend will be notified on the result of the verification with the [Verification Result Event](doc:verification-rest-callback-api#verification-result-event).    #### Data verification    With the data verification method, a user's phone number is verified by carrier using mobile data network. For additional security, it is recommended that you control which verification requests should proceed and which ones not, by listening in your backend for the [Verification Request Event](doc:verification-rest-verification-api#verification-request) and respond accordingly. Your backend will be notified on the result of the verification with the [Verification Result Event](doc:verification-rest-callback-api#verification-result-event).    > 📘 For information about webhooks and the verifications events [Callbacks](/docs/verification-rest-callback-api).
 *
 * The version of the OpenAPI document: 1.0.0
 * Contact: [email protected]
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

package com.sinch.sdk.domains.verification.models.dto.v1;

import com.fasterxml.jackson.annotation.JsonFilter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import java.time.OffsetDateTime;
import java.util.Objects;

/** SimSwapResponseDto */
@JsonPropertyOrder({
  SimSwapResponseDto.JSON_PROPERTY_ID,
  SimSwapResponseDto.JSON_PROPERTY_SWAPPED,
  SimSwapResponseDto.JSON_PROPERTY_SWAP_DATE
})
@JsonFilter("uninitializedFilter")
@JsonInclude(value = JsonInclude.Include.CUSTOM)
public class SimSwapResponseDto {
  private static final long serialVersionUID = 1L;
  public static final String JSON_PROPERTY_ID = "id";
  private String id;
  private boolean idDefined = false;

  public static final String JSON_PROPERTY_SWAPPED = "swapped";
  private Boolean swapped;
  private boolean swappedDefined = false;

  public static final String JSON_PROPERTY_SWAP_DATE = "swapDate";
  private OffsetDateTime swapDate;
  private boolean swapDateDefined = false;

  public SimSwapResponseDto() {}

  public SimSwapResponseDto id(String id) {
    this.id = id;
    this.idDefined = true;
    return this;
  }

  /**
   * Process identifier.
   *
   * @return id
   */
  @JsonProperty(JSON_PROPERTY_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getId() {
    return id;
  }

  @JsonIgnore
  public boolean getIdDefined() {
    return idDefined;
  }

  @JsonProperty(JSON_PROPERTY_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setId(String id) {
    this.id = id;
    this.idDefined = true;
  }

  public SimSwapResponseDto swapped(Boolean swapped) {
    this.swapped = swapped;
    this.swappedDefined = true;
    return this;
  }

  /**
   * Result of SIM swap detection process.
   *
   * @return swapped
   */
  @JsonProperty(JSON_PROPERTY_SWAPPED)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public Boolean getSwapped() {
    return swapped;
  }

  @JsonIgnore
  public boolean getSwappedDefined() {
    return swappedDefined;
  }

  @JsonProperty(JSON_PROPERTY_SWAPPED)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setSwapped(Boolean swapped) {
    this.swapped = swapped;
    this.swappedDefined = true;
  }

  public SimSwapResponseDto swapDate(OffsetDateTime swapDate) {
    this.swapDate = swapDate;
    this.swapDateDefined = true;
    return this;
  }

  /**
   * Time of last SIM card swap.
   *
   * @return swapDate
   */
  @JsonProperty(JSON_PROPERTY_SWAP_DATE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public OffsetDateTime getSwapDate() {
    return swapDate;
  }

  @JsonIgnore
  public boolean getSwapDateDefined() {
    return swapDateDefined;
  }

  @JsonProperty(JSON_PROPERTY_SWAP_DATE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setSwapDate(OffsetDateTime swapDate) {
    this.swapDate = swapDate;
    this.swapDateDefined = true;
  }

  /** Return true if this SimSwapResponse object is equal to o. */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    SimSwapResponseDto simSwapResponse = (SimSwapResponseDto) o;
    return Objects.equals(this.id, simSwapResponse.id)
        && Objects.equals(this.swapped, simSwapResponse.swapped)
        && Objects.equals(this.swapDate, simSwapResponse.swapDate);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, swapped, swapDate);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class SimSwapResponseDto {\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    swapped: ").append(toIndentedString(swapped)).append("\n");
    sb.append("    swapDate: ").append(toIndentedString(swapDate)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy