
com.braintreegateway.DocumentUploadRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of braintree-java Show documentation
Show all versions of braintree-java Show documentation
Java Client Library for Braintree Payments Gateway
package com.braintreegateway;
import java.io.File;
public class DocumentUploadRequest extends Request {
private DocumentUpload.Kind kind;
private File file;
public DocumentUploadRequest(DocumentUpload.Kind kind, File file) {
if (kind == null) {
throw new IllegalArgumentException("DocumentUpload.Kind must not be null");
}
if (file == null) {
throw new IllegalArgumentException("File must not be null");
}
this.kind = kind;
this.file = file;
}
public String getRequest() {
return "{\"document_upload[kind]\": \"" + kind.toString() + "\"}";
}
public File getFile() {
return file;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy