com.sinch.sdk.domains.verification.models.requests.VerificationReportCalloutRequestParameters 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.
package com.sinch.sdk.domains.verification.models.requests;
import com.sinch.sdk.core.models.OptionalValue;
import com.sinch.sdk.domains.verification.models.VerificationMethodType;
/**
* Dedicated request parameters to be used to start a verification report by callout (Verification
* by placing a PSTN call to the user's phone)
*
* @since 1.0
*/
public class VerificationReportCalloutRequestParameters
extends VerificationReportRequestParameters {
private final OptionalValue code;
private VerificationReportCalloutRequestParameters(OptionalValue code) {
super(OptionalValue.of(VerificationMethodType.CALLOUT));
this.code = code;
}
/**
* See {@link VerificationReportCalloutRequestParameters.Builder#setCode(String) builder setter}
*
* @return Code value
* @since 1.0
*/
public OptionalValue getCode() {
return code;
}
@Override
public String toString() {
return "VerificationReportCalloutRequestParameters{"
+ "code='"
+ code
+ '\''
+ "} "
+ super.toString();
}
/**
* Getting Builder
*
* @return New Builder instance
* @since 1.0
*/
public static Builder builder() {
return new Builder();
}
/**
* Dedicated Builder
*
* @since 1.0
*/
public static class Builder extends VerificationReportRequestParameters.Builder {
OptionalValue code = OptionalValue.empty();
protected Builder() {
super(VerificationMethodType.CALLOUT);
}
/**
* The code which was received by the user submitting the SMS verification.
*
* @param code The code which was received by the user submitting the Phone Call verification.
* @return current builder
*/
public Builder setCode(String code) {
this.code = OptionalValue.of(code);
return this;
}
/**
* Create instance
*
* @return The instance build with current builder values
* @since 1.0
*/
public VerificationReportCalloutRequestParameters build() {
return new VerificationReportCalloutRequestParameters(code);
}
@Override
protected Builder self() {
return this;
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy