All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.braintreegateway.DocumentUploadGateway Maven / Gradle / Ivy

There is a newer version: 3.32.0_1
Show newest version
package com.braintreegateway;

import com.braintreegateway.util.Http;
import com.braintreegateway.util.NodeWrapper;

public class DocumentUploadGateway {
  private final Http http;
  private final Configuration configuration;

  private final String BASE_URL = "/document_uploads";

  public DocumentUploadGateway(Http http, Configuration configuration) {
    this.http = http;
    this.configuration = configuration;
  }

  public Result create(DocumentUploadRequest request) {
    final NodeWrapper response = http.postMultipart(configuration.getMerchantPath() + BASE_URL, request.getRequest(), request.getFile());
    return new Result(response, DocumentUpload.class);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy