com.braintreegateway.AddOnGateway 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.ArrayList;
import java.util.List;
public class AddOnGateway {
private Http http;
private Configuration configuration;
public AddOnGateway(Http http, Configuration configuration) {
this.http = http;
this.configuration = configuration;
}
public List all() {
NodeWrapper node = http.get(configuration.getMerchantPath() + "/add_ons");
List addOns = new ArrayList();
for (NodeWrapper addOnResponse : node.findAll("add-on")) {
addOns.add(new AddOn(addOnResponse));
}
return addOns;
}
}