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

com.braintreegateway.AddOnGateway Maven / Gradle / Ivy

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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy