com.braintreegateway.SettlementBatchSummaryGateway Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of org.apache.servicemix.bundles.braintree-java
Show all versions of org.apache.servicemix.bundles.braintree-java
This OSGi bundle wraps ${pkgArtifactId} ${pkgVersion} jar file.
The newest version!
package com.braintreegateway;
import com.braintreegateway.util.Http;
import com.braintreegateway.util.NodeWrapper;
import java.util.Calendar;
public class SettlementBatchSummaryGateway {
private Http http;
private Configuration configuration;
public SettlementBatchSummaryGateway(Http http, Configuration configuration) {
this.http = http;
this.configuration = configuration;
}
public Result generate(Calendar settlementDate) {
SettlementBatchSummaryRequest request = new SettlementBatchSummaryRequest();
request.settlementDate(settlementDate);
return doGenerate(request);
}
public Result generate(Calendar settlementDate, String groupByCustomField) {
SettlementBatchSummaryRequest request = new SettlementBatchSummaryRequest();
request.settlementDate(settlementDate);
request.groupByCustomField(groupByCustomField);
return doGenerate(request);
}
private Result doGenerate(SettlementBatchSummaryRequest request) {
NodeWrapper node = http.post(configuration.getMerchantPath() + "/settlement_batch_summary", request);
return new Result(node, SettlementBatchSummary.class);
}
}