com.braintreegateway.MerchantRequest 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.util.List;
public class MerchantRequest extends Request {
public String email;
public String countryCodeAlpha3;
public String companyName;
public String scope;
public PayPalOnlyAccountRequest payPalOnlyAccountRequest;
public List paymentMethods;
public List currencies;
public MerchantRequest email(String email) {
this.email = email;
return this;
}
public MerchantRequest countryCodeAlpha3(String countryCodeAlpha3) {
this.countryCodeAlpha3 = countryCodeAlpha3;
return this;
}
public MerchantRequest companyName(String companyName) {
this.companyName = companyName;
return this;
}
public MerchantRequest paymentMethods(List paymentMethods) {
this.paymentMethods = paymentMethods;
return this;
}
public MerchantRequest currencies(List currencies) {
this.currencies = currencies;
return this;
}
public MerchantRequest scope(String scope) {
this.scope = scope;
return this;
}
@Override
public String toXML() {
return new RequestBuilder("merchant")
.addElement("email", email)
.addElement("countryCodeAlpha3", countryCodeAlpha3)
.addElement("companyName", companyName)
.addElement("paymentMethods", paymentMethods)
.addElement("currencies", currencies)
.addElement("scope", scope)
.addElement("paypalAccount", payPalOnlyAccountRequest)
.toXML();
}
public PayPalOnlyAccountRequest payPalAccount() {
this.payPalOnlyAccountRequest = new PayPalOnlyAccountRequest(this);
return this.payPalOnlyAccountRequest;
}
}