All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.braintreegateway.PayPalAccountGateway Maven / Gradle / Ivy

There is a newer version: 3.32.0_1
Show 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);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy