com.banxa.model.request.IdentityDocument Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-sdk Show documentation
Show all versions of java-sdk Show documentation
The Java SDK for integration with Banxa's API
The newest version!
package com.banxa.model.request;
import com.banxa.model.IdentityDocumentType;
import java.util.ArrayList;
import java.util.List;
public class IdentityDocument {
private final IdentityDocumentType type;
private final List images;
private final IdentityDocumentData data;
public IdentityDocument(Builder builder) {
this.type = builder.type;
this.images = builder.images;
this.data = builder.data;
}
public IdentityDocumentType getType() {
return type;
}
public List getImages() {
return images;
}
public IdentityDocumentData getData() {
return data;
}
public static class Builder {
private final IdentityDocumentType type;
private List images;
private IdentityDocumentData data;
public Builder(IdentityDocumentType type) {
this.type = type;
}
public Builder addImage(IdentityDocumentImage image) {
if (images == null) {
images = new ArrayList<>();
}
images.add(image);
return this;
}
public Builder withData(IdentityDocumentData data) {
this.data = data;
return this;
}
public IdentityDocument build() {
return new IdentityDocument(this);
}
}
}