com.stripe.param.identity.VerificationSessionUpdateParams Maven / Gradle / Ivy
// Generated by delombok at Thu Oct 07 18:42:34 EDT 2021
// File generated from our OpenAPI spec
package com.stripe.param.identity;
import com.google.gson.annotations.SerializedName;
import com.stripe.net.ApiRequestParams;
import com.stripe.param.common.EmptyParam;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class VerificationSessionUpdateParams extends ApiRequestParams {
/**
* Specifies which fields in the response should be expanded.
*/
@SerializedName("expand")
List expand;
/**
* Map of extra parameters for custom features not available in this client library. The content
* in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
* key/value pair is serialized as if the key is a root-level field (serialized) name in this
* param object. Effectively, this map is flattened to its parent instance.
*/
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
/**
* Set of key-value pairs that you can attach
* to an object. This can be useful for storing additional information about the object in a
* structured format. Individual keys can be unset by posting an empty value to them. All keys can
* be unset by posting an empty value to {@code metadata}.
*/
@SerializedName("metadata")
Map metadata;
/**
* A set of options for the session’s verification checks.
*/
@SerializedName("options")
Options options;
/**
* The type of verification
* check to be performed.
*/
@SerializedName("type")
Type type;
private VerificationSessionUpdateParams(List expand, Map extraParams, Map metadata, Options options, Type type) {
this.expand = expand;
this.extraParams = extraParams;
this.metadata = metadata;
this.options = options;
this.type = type;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private List expand;
private Map extraParams;
private Map metadata;
private Options options;
private Type type;
/**
* Finalize and obtain parameter instance from this builder.
*/
public VerificationSessionUpdateParams build() {
return new VerificationSessionUpdateParams(this.expand, this.extraParams, this.metadata, this.options, this.type);
}
/**
* Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and
* subsequent calls adds additional elements to the original list. See {@link
* VerificationSessionUpdateParams#expand} for the field documentation.
*/
public Builder addExpand(String element) {
if (this.expand == null) {
this.expand = new ArrayList<>();
}
this.expand.add(element);
return this;
}
/**
* Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and
* subsequent calls adds additional elements to the original list. See {@link
* VerificationSessionUpdateParams#expand} for the field documentation.
*/
public Builder addAllExpand(List elements) {
if (this.expand == null) {
this.expand = new ArrayList<>();
}
this.expand.addAll(elements);
return this;
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
* call, and subsequent calls add additional key/value pairs to the original map. See {@link
* VerificationSessionUpdateParams#extraParams} for the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
* See {@link VerificationSessionUpdateParams#extraParams} for the field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
/**
* Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call,
* and subsequent calls add additional key/value pairs to the original map. See {@link
* VerificationSessionUpdateParams#metadata} for the field documentation.
*/
public Builder putMetadata(String key, String value) {
if (this.metadata == null) {
this.metadata = new HashMap<>();
}
this.metadata.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `metadata` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
* See {@link VerificationSessionUpdateParams#metadata} for the field documentation.
*/
public Builder putAllMetadata(Map map) {
if (this.metadata == null) {
this.metadata = new HashMap<>();
}
this.metadata.putAll(map);
return this;
}
/**
* A set of options for the session’s verification checks.
*/
public Builder setOptions(Options options) {
this.options = options;
return this;
}
/**
* The type of verification
* check to be performed.
*/
public Builder setType(Type type) {
this.type = type;
return this;
}
}
public static class Options {
/**
* Options that apply to the document check.
*/
@SerializedName("document")
Object document;
/**
* Map of extra parameters for custom features not available in this client library. The content
* in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
* key/value pair is serialized as if the key is a root-level field (serialized) name in this
* param object. Effectively, this map is flattened to its parent instance.
*/
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
private Options(Object document, Map extraParams) {
this.document = document;
this.extraParams = extraParams;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Object document;
private Map extraParams;
/**
* Finalize and obtain parameter instance from this builder.
*/
public Options build() {
return new Options(this.document, this.extraParams);
}
/**
* Options that apply to the document
* check.
*/
public Builder setDocument(Document document) {
this.document = document;
return this;
}
/**
* Options that apply to the document
* check.
*/
public Builder setDocument(EmptyParam document) {
this.document = document;
return this;
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
* call, and subsequent calls add additional key/value pairs to the original map. See {@link
* VerificationSessionUpdateParams.Options#extraParams} for the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
* See {@link VerificationSessionUpdateParams.Options#extraParams} for the field
* documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
public static class Document {
/**
* Array of strings of allowed identity document types. If the provided identity document
* isn’t one of the allowed types, the verification check will fail with a
* document_type_not_allowed error code.
*/
@SerializedName("allowed_types")
List allowedTypes;
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
* name in this param object. Effectively, this map is flattened to its parent instance.
*/
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
/**
* Collect an ID number and perform an ID number
* check with the document’s extracted name and date of birth.
*/
@SerializedName("require_id_number")
Boolean requireIdNumber;
/**
* Disable image uploads, identity document images have to be captured using the device’s
* camera.
*/
@SerializedName("require_live_capture")
Boolean requireLiveCapture;
/**
* Capture a face image and perform a selfie check
* comparing a photo ID and a picture of your user’s face. Learn more.
*/
@SerializedName("require_matching_selfie")
Boolean requireMatchingSelfie;
private Document(List allowedTypes, Map extraParams, Boolean requireIdNumber, Boolean requireLiveCapture, Boolean requireMatchingSelfie) {
this.allowedTypes = allowedTypes;
this.extraParams = extraParams;
this.requireIdNumber = requireIdNumber;
this.requireLiveCapture = requireLiveCapture;
this.requireMatchingSelfie = requireMatchingSelfie;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private List allowedTypes;
private Map extraParams;
private Boolean requireIdNumber;
private Boolean requireLiveCapture;
private Boolean requireMatchingSelfie;
/** Finalize and obtain parameter instance from this builder. */
public Document build() {
return new Document(this.allowedTypes, this.extraParams, this.requireIdNumber, this.requireLiveCapture, this.requireMatchingSelfie);
}
/**
* Add an element to `allowedTypes` list. A list is initialized for the first `add/addAll`
* call, and subsequent calls adds additional elements to the original list. See {@link
* VerificationSessionUpdateParams.Options.Document#allowedTypes} for the field
* documentation.
*/
public Builder addAllowedType(AllowedType element) {
if (this.allowedTypes == null) {
this.allowedTypes = new ArrayList<>();
}
this.allowedTypes.add(element);
return this;
}
/**
* Add all elements to `allowedTypes` list. A list is initialized for the first `add/addAll`
* call, and subsequent calls adds additional elements to the original list. See {@link
* VerificationSessionUpdateParams.Options.Document#allowedTypes} for the field
* documentation.
*/
public Builder addAllAllowedType(List elements) {
if (this.allowedTypes == null) {
this.allowedTypes = new ArrayList<>();
}
this.allowedTypes.addAll(elements);
return this;
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link VerificationSessionUpdateParams.Options.Document#extraParams} for the
* field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link VerificationSessionUpdateParams.Options.Document#extraParams} for the
* field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
/**
* Collect an ID number and perform an ID number
* check with the document’s extracted name and date of birth.
*/
public Builder setRequireIdNumber(Boolean requireIdNumber) {
this.requireIdNumber = requireIdNumber;
return this;
}
/**
* Disable image uploads, identity document images have to be captured using the device’s
* camera.
*/
public Builder setRequireLiveCapture(Boolean requireLiveCapture) {
this.requireLiveCapture = requireLiveCapture;
return this;
}
public Builder setRequireMatchingSelfie(Boolean requireMatchingSelfie) {
this.requireMatchingSelfie = requireMatchingSelfie;
return this;
}
}
public enum AllowedType implements ApiRequestParams.EnumParam {
@SerializedName("driving_license")
DRIVING_LICENSE("driving_license"), @SerializedName("id_card")
ID_CARD("id_card"), @SerializedName("passport")
PASSPORT("passport");
private final String value;
AllowedType(String value) {
this.value = value;
}
@Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getValue() {
return this.value;
}
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public List getAllowedTypes() {
return this.allowedTypes;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Boolean getRequireIdNumber() {
return this.requireIdNumber;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Boolean getRequireLiveCapture() {
return this.requireLiveCapture;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Boolean getRequireMatchingSelfie() {
return this.requireMatchingSelfie;
}
}
/**
* Options that apply to the document check.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Object getDocument() {
return this.document;
}
/**
* Map of extra parameters for custom features not available in this client library. The content
* in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
* key/value pair is serialized as if the key is a root-level field (serialized) name in this
* param object. Effectively, this map is flattened to its parent instance.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
}
/**
* Capture a face image and perform a selfie check
* comparing a photo ID and a picture of your user’s face. Learn more.
*/
public enum Type implements ApiRequestParams.EnumParam {
@SerializedName("document")
DOCUMENT("document"), @SerializedName("id_number")
ID_NUMBER("id_number");
private final String value;
Type(String value) {
this.value = value;
}
@Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getValue() {
return this.value;
}
}
/**
* Specifies which fields in the response should be expanded.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public List getExpand() {
return this.expand;
}
/**
* Map of extra parameters for custom features not available in this client library. The content
* in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
* key/value pair is serialized as if the key is a root-level field (serialized) name in this
* param object. Effectively, this map is flattened to its parent instance.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
/**
* Set of key-value pairs that you can attach
* to an object. This can be useful for storing additional information about the object in a
* structured format. Individual keys can be unset by posting an empty value to them. All keys can
* be unset by posting an empty value to {@code metadata}.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getMetadata() {
return this.metadata;
}
/**
* A set of options for the session’s verification checks.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Options getOptions() {
return this.options;
}
/**
* The type of verification
* check to be performed.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Type getType() {
return this.type;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy