com.sinch.sdk.domains.verification.models.dto.v1.FlashCallInitiateVerificationResponseDto Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sinch-sdk-java Show documentation
Show all versions of sinch-sdk-java Show documentation
SDK providing a Java API for the Sinch REST APIs.
/*
* 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.util.ArrayList;
import java.util.List;
import java.util.Objects;
/** FlashCallInitiateVerificationResponseDto */
@JsonPropertyOrder({
FlashCallInitiateVerificationResponseDto.JSON_PROPERTY_CLI,
FlashCallInitiateVerificationResponseDto.JSON_PROPERTY_CLI_FILTER,
FlashCallInitiateVerificationResponseDto.JSON_PROPERTY_INTERCEPTION_TIMEOUT,
FlashCallInitiateVerificationResponseDto.JSON_PROPERTY_REPORT_TIMEOUT,
FlashCallInitiateVerificationResponseDto.JSON_PROPERTY_DENY_CALL_AFTER,
FlashCallInitiateVerificationResponseDto.JSON_PROPERTY_CALL_ID,
FlashCallInitiateVerificationResponseDto.JSON_PROPERTY_SUB_VERIFICATION_ID,
FlashCallInitiateVerificationResponseDto.JSON_PROPERTY_LINKS
})
@JsonFilter("uninitializedFilter")
@JsonInclude(value = JsonInclude.Include.CUSTOM)
public class FlashCallInitiateVerificationResponseDto {
private static final long serialVersionUID = 1L;
public static final String JSON_PROPERTY_CLI = "cli";
private String cli;
private boolean cliDefined = false;
public static final String JSON_PROPERTY_CLI_FILTER = "cliFilter";
private String cliFilter;
private boolean cliFilterDefined = false;
public static final String JSON_PROPERTY_INTERCEPTION_TIMEOUT = "interceptionTimeout";
private Integer interceptionTimeout;
private boolean interceptionTimeoutDefined = false;
public static final String JSON_PROPERTY_REPORT_TIMEOUT = "reportTimeout";
private Integer reportTimeout;
private boolean reportTimeoutDefined = false;
public static final String JSON_PROPERTY_DENY_CALL_AFTER = "denyCallAfter";
private Integer denyCallAfter;
private boolean denyCallAfterDefined = false;
public static final String JSON_PROPERTY_CALL_ID = "callId";
private String callId;
private boolean callIdDefined = false;
public static final String JSON_PROPERTY_SUB_VERIFICATION_ID = "subVerificationId";
private String subVerificationId;
private boolean subVerificationIdDefined = false;
public static final String JSON_PROPERTY_LINKS = "_links";
private List links;
private boolean linksDefined = false;
public FlashCallInitiateVerificationResponseDto() {}
public FlashCallInitiateVerificationResponseDto cli(String cli) {
this.cli = cli;
this.cliDefined = true;
return this;
}
/**
* Get cli
*
* @return cli
*/
@JsonProperty(JSON_PROPERTY_CLI)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getCli() {
return cli;
}
@JsonIgnore
public boolean getCliDefined() {
return cliDefined;
}
@JsonProperty(JSON_PROPERTY_CLI)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCli(String cli) {
this.cli = cli;
this.cliDefined = true;
}
public FlashCallInitiateVerificationResponseDto cliFilter(String cliFilter) {
this.cliFilter = cliFilter;
this.cliFilterDefined = true;
return this;
}
/**
* Filter that should be applied for incoming calls to intercept the Flashcall.
*
* @return cliFilter
*/
@JsonProperty(JSON_PROPERTY_CLI_FILTER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getCliFilter() {
return cliFilter;
}
@JsonIgnore
public boolean getCliFilterDefined() {
return cliFilterDefined;
}
@JsonProperty(JSON_PROPERTY_CLI_FILTER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCliFilter(String cliFilter) {
this.cliFilter = cliFilter;
this.cliFilterDefined = true;
}
public FlashCallInitiateVerificationResponseDto interceptionTimeout(Integer interceptionTimeout) {
this.interceptionTimeout = interceptionTimeout;
this.interceptionTimeoutDefined = true;
return this;
}
/**
* Amount of seconds client should wait for the Flashcall.
*
* @return interceptionTimeout
*/
@JsonProperty(JSON_PROPERTY_INTERCEPTION_TIMEOUT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Integer getInterceptionTimeout() {
return interceptionTimeout;
}
@JsonIgnore
public boolean getInterceptionTimeoutDefined() {
return interceptionTimeoutDefined;
}
@JsonProperty(JSON_PROPERTY_INTERCEPTION_TIMEOUT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setInterceptionTimeout(Integer interceptionTimeout) {
this.interceptionTimeout = interceptionTimeout;
this.interceptionTimeoutDefined = true;
}
public FlashCallInitiateVerificationResponseDto reportTimeout(Integer reportTimeout) {
this.reportTimeout = reportTimeout;
this.reportTimeoutDefined = true;
return this;
}
/**
* Get reportTimeout
*
* @return reportTimeout
*/
@JsonProperty(JSON_PROPERTY_REPORT_TIMEOUT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Integer getReportTimeout() {
return reportTimeout;
}
@JsonIgnore
public boolean getReportTimeoutDefined() {
return reportTimeoutDefined;
}
@JsonProperty(JSON_PROPERTY_REPORT_TIMEOUT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setReportTimeout(Integer reportTimeout) {
this.reportTimeout = reportTimeout;
this.reportTimeoutDefined = true;
}
public FlashCallInitiateVerificationResponseDto denyCallAfter(Integer denyCallAfter) {
this.denyCallAfter = denyCallAfter;
this.denyCallAfterDefined = true;
return this;
}
/**
* Get denyCallAfter
*
* @return denyCallAfter
*/
@JsonProperty(JSON_PROPERTY_DENY_CALL_AFTER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Integer getDenyCallAfter() {
return denyCallAfter;
}
@JsonIgnore
public boolean getDenyCallAfterDefined() {
return denyCallAfterDefined;
}
@JsonProperty(JSON_PROPERTY_DENY_CALL_AFTER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDenyCallAfter(Integer denyCallAfter) {
this.denyCallAfter = denyCallAfter;
this.denyCallAfterDefined = true;
}
public FlashCallInitiateVerificationResponseDto callId(String callId) {
this.callId = callId;
this.callIdDefined = true;
return this;
}
/**
* Get callId
*
* @return callId
*/
@JsonProperty(JSON_PROPERTY_CALL_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getCallId() {
return callId;
}
@JsonIgnore
public boolean getCallIdDefined() {
return callIdDefined;
}
@JsonProperty(JSON_PROPERTY_CALL_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCallId(String callId) {
this.callId = callId;
this.callIdDefined = true;
}
public FlashCallInitiateVerificationResponseDto subVerificationId(String subVerificationId) {
this.subVerificationId = subVerificationId;
this.subVerificationIdDefined = true;
return this;
}
/**
* Get subVerificationId
*
* @return subVerificationId
*/
@JsonProperty(JSON_PROPERTY_SUB_VERIFICATION_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getSubVerificationId() {
return subVerificationId;
}
@JsonIgnore
public boolean getSubVerificationIdDefined() {
return subVerificationIdDefined;
}
@JsonProperty(JSON_PROPERTY_SUB_VERIFICATION_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setSubVerificationId(String subVerificationId) {
this.subVerificationId = subVerificationId;
this.subVerificationIdDefined = true;
}
public FlashCallInitiateVerificationResponseDto links(List links) {
this.links = links;
this.linksDefined = true;
return this;
}
public FlashCallInitiateVerificationResponseDto addLinksItem(
VerificationResourceLinkDto linksItem) {
if (this.links == null) {
this.links = new ArrayList<>();
}
this.linksDefined = true;
this.links.add(linksItem);
return this;
}
/**
* Get links
*
* @return links
*/
@JsonProperty(JSON_PROPERTY_LINKS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getLinks() {
return links;
}
@JsonIgnore
public boolean getLinksDefined() {
return linksDefined;
}
@JsonProperty(JSON_PROPERTY_LINKS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setLinks(List links) {
this.links = links;
this.linksDefined = true;
}
/** Return true if this FlashCallInitiateVerificationResponse object is equal to o. */
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
FlashCallInitiateVerificationResponseDto flashCallInitiateVerificationResponse =
(FlashCallInitiateVerificationResponseDto) o;
return Objects.equals(this.cli, flashCallInitiateVerificationResponse.cli)
&& Objects.equals(this.cliFilter, flashCallInitiateVerificationResponse.cliFilter)
&& Objects.equals(
this.interceptionTimeout, flashCallInitiateVerificationResponse.interceptionTimeout)
&& Objects.equals(this.reportTimeout, flashCallInitiateVerificationResponse.reportTimeout)
&& Objects.equals(this.denyCallAfter, flashCallInitiateVerificationResponse.denyCallAfter)
&& Objects.equals(this.callId, flashCallInitiateVerificationResponse.callId)
&& Objects.equals(
this.subVerificationId, flashCallInitiateVerificationResponse.subVerificationId)
&& Objects.equals(this.links, flashCallInitiateVerificationResponse.links);
}
@Override
public int hashCode() {
return Objects.hash(
cli,
cliFilter,
interceptionTimeout,
reportTimeout,
denyCallAfter,
callId,
subVerificationId,
links);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class FlashCallInitiateVerificationResponseDto {\n");
sb.append(" cli: ").append(toIndentedString(cli)).append("\n");
sb.append(" cliFilter: ").append(toIndentedString(cliFilter)).append("\n");
sb.append(" interceptionTimeout: ")
.append(toIndentedString(interceptionTimeout))
.append("\n");
sb.append(" reportTimeout: ").append(toIndentedString(reportTimeout)).append("\n");
sb.append(" denyCallAfter: ").append(toIndentedString(denyCallAfter)).append("\n");
sb.append(" callId: ").append(toIndentedString(callId)).append("\n");
sb.append(" subVerificationId: ").append(toIndentedString(subVerificationId)).append("\n");
sb.append(" links: ").append(toIndentedString(links)).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