com.braintreegateway.AddressInternationalPhoneRequest 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.
package com.braintreegateway;
public class AddressInternationalPhoneRequest extends Request {
private AddressRequest parent;
private String countryCode;
private String nationalNumber;
public AddressInternationalPhoneRequest() {}
public AddressInternationalPhoneRequest(AddressRequest parent) {
this.parent = parent;
}
public AddressRequest done() {
return parent;
}
public AddressInternationalPhoneRequest countryCode(String countryCode) {
this.countryCode = countryCode;
return this;
}
public AddressInternationalPhoneRequest nationalNumber(String nationalNumber) {
this.nationalNumber = nationalNumber;
return this;
}
@Override
public String toXML() {
return buildRequest("internationalPhone").toXML();
}
protected RequestBuilder buildRequest(String root) {
return new RequestBuilder(root)
.addElement("countryCode", countryCode)
.addElement("nationalNumber", nationalNumber);
}
}