com.braintreegateway.TransactionCloneRequest 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 java.math.BigDecimal;
public class TransactionCloneRequest extends Request {
private BigDecimal amount;
private String channel;
private TransactionOptionsCloneRequest transactionOptionsCloneRequest;
public TransactionCloneRequest amount(BigDecimal amount) {
this.amount = amount;
return this;
}
public TransactionCloneRequest channel(String channel) {
this.channel = channel;
return this;
}
public TransactionOptionsCloneRequest options() {
transactionOptionsCloneRequest = new TransactionOptionsCloneRequest(this);
return transactionOptionsCloneRequest;
}
@Override
public String toXML() {
return buildRequest("transactionClone").toXML();
}
protected RequestBuilder buildRequest(String root) {
RequestBuilder builder = new RequestBuilder(root)
.addElement("amount", amount)
.addElement("channel", channel)
.addElement("options", transactionOptionsCloneRequest);
return builder;
}
}