com.braintreegateway.PayPalAccountGateway 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;
public class PayPalAccountGateway {
private Http http;
private Configuration configuration;
public PayPalAccountGateway(Http http, Configuration configuration) {
this.http = http;
this.configuration = configuration;
}
public PayPalAccount find(String token) {
return new PayPalAccount(http.get(configuration.getMerchantPath() + "/payment_methods/paypal_account/" + token));
}
public Result delete(String token) {
http.delete(configuration.getMerchantPath() + "/payment_methods/paypal_account/" + token);
return new Result();
}
public Result update(String token, PayPalAccountRequest request) {
NodeWrapper response = http.put(configuration.getMerchantPath() + "/payment_methods/paypal_account/" + token, request);
return new Result(response, PayPalAccount.class);
}
}