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

org.apache.camel.component.braintree.internal.BraintreeApiCollection Maven / Gradle / Ivy

There is a newer version: 4.8.1
Show newest version

/*
 * Camel ApiCollection generated by camel-api-component-maven-plugin
 */
package org.apache.camel.component.braintree.internal;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.HashMap;

import org.apache.camel.component.braintree.BraintreeConfiguration;
import org.apache.camel.component.braintree.AddOnGatewayEndpointConfiguration;
import org.apache.camel.component.braintree.AddressGatewayEndpointConfiguration;
import org.apache.camel.component.braintree.ClientTokenGatewayEndpointConfiguration;
import org.apache.camel.component.braintree.CreditCardVerificationGatewayEndpointConfiguration;
import org.apache.camel.component.braintree.CustomerGatewayEndpointConfiguration;
import org.apache.camel.component.braintree.DiscountGatewayEndpointConfiguration;
import org.apache.camel.component.braintree.DisputeGatewayEndpointConfiguration;
import org.apache.camel.component.braintree.DocumentUploadGatewayEndpointConfiguration;
import org.apache.camel.component.braintree.MerchantAccountGatewayEndpointConfiguration;
import org.apache.camel.component.braintree.PaymentMethodGatewayEndpointConfiguration;
import org.apache.camel.component.braintree.PaymentMethodNonceGatewayEndpointConfiguration;
import org.apache.camel.component.braintree.PlanGatewayEndpointConfiguration;
import org.apache.camel.component.braintree.ReportGatewayEndpointConfiguration;
import org.apache.camel.component.braintree.SettlementBatchSummaryGatewayEndpointConfiguration;
import org.apache.camel.component.braintree.SubscriptionGatewayEndpointConfiguration;
import org.apache.camel.component.braintree.TransactionGatewayEndpointConfiguration;
import org.apache.camel.component.braintree.WebhookNotificationGatewayEndpointConfiguration;

import org.apache.camel.support.component.ApiCollection;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodHelper;

/**
 * Camel {@link ApiCollection} for Braintree
 */
public final class BraintreeApiCollection extends ApiCollection {

    private static BraintreeApiCollection collection;

    private BraintreeApiCollection() {
        final Map aliases = new HashMap();
        final Map> apiHelpers = new HashMap<>();
        final Map, BraintreeApiName> apiMethods = new HashMap<>();

        List nullableArgs;

        aliases.clear();
        nullableArgs = Arrays.asList();
        apiHelpers.put(BraintreeApiName.ADDON, new ApiMethodHelper(AddOnGatewayApiMethod.class, aliases, nullableArgs));
        apiMethods.put(AddOnGatewayApiMethod.class, BraintreeApiName.ADDON);

        aliases.clear();
        nullableArgs = Arrays.asList();
        apiHelpers.put(BraintreeApiName.ADDRESS, new ApiMethodHelper(AddressGatewayApiMethod.class, aliases, nullableArgs));
        apiMethods.put(AddressGatewayApiMethod.class, BraintreeApiName.ADDRESS);

        aliases.clear();
        nullableArgs = Arrays.asList();
        apiHelpers.put(BraintreeApiName.CLIENTTOKEN, new ApiMethodHelper(ClientTokenGatewayApiMethod.class, aliases, nullableArgs));
        apiMethods.put(ClientTokenGatewayApiMethod.class, BraintreeApiName.CLIENTTOKEN);

        aliases.clear();
        nullableArgs = Arrays.asList();
        apiHelpers.put(BraintreeApiName.CREDITCARDVERIFICATION, new ApiMethodHelper(CreditCardVerificationGatewayApiMethod.class, aliases, nullableArgs));
        apiMethods.put(CreditCardVerificationGatewayApiMethod.class, BraintreeApiName.CREDITCARDVERIFICATION);

        aliases.clear();
        nullableArgs = Arrays.asList();
        apiHelpers.put(BraintreeApiName.CUSTOMER, new ApiMethodHelper(CustomerGatewayApiMethod.class, aliases, nullableArgs));
        apiMethods.put(CustomerGatewayApiMethod.class, BraintreeApiName.CUSTOMER);

        aliases.clear();
        nullableArgs = Arrays.asList();
        apiHelpers.put(BraintreeApiName.DISCOUNT, new ApiMethodHelper(DiscountGatewayApiMethod.class, aliases, nullableArgs));
        apiMethods.put(DiscountGatewayApiMethod.class, BraintreeApiName.DISCOUNT);

        aliases.clear();
        nullableArgs = Arrays.asList();
        apiHelpers.put(BraintreeApiName.DISPUTE, new ApiMethodHelper(DisputeGatewayApiMethod.class, aliases, nullableArgs));
        apiMethods.put(DisputeGatewayApiMethod.class, BraintreeApiName.DISPUTE);

        aliases.clear();
        nullableArgs = Arrays.asList();
        apiHelpers.put(BraintreeApiName.DOCUMENTUPLOAD, new ApiMethodHelper(DocumentUploadGatewayApiMethod.class, aliases, nullableArgs));
        apiMethods.put(DocumentUploadGatewayApiMethod.class, BraintreeApiName.DOCUMENTUPLOAD);

        aliases.clear();
        nullableArgs = Arrays.asList();
        apiHelpers.put(BraintreeApiName.MERCHANTACCOUNT, new ApiMethodHelper(MerchantAccountGatewayApiMethod.class, aliases, nullableArgs));
        apiMethods.put(MerchantAccountGatewayApiMethod.class, BraintreeApiName.MERCHANTACCOUNT);

        aliases.clear();
        nullableArgs = Arrays.asList();
        apiHelpers.put(BraintreeApiName.PAYMENTMETHOD, new ApiMethodHelper(PaymentMethodGatewayApiMethod.class, aliases, nullableArgs));
        apiMethods.put(PaymentMethodGatewayApiMethod.class, BraintreeApiName.PAYMENTMETHOD);

        aliases.clear();
        nullableArgs = Arrays.asList();
        apiHelpers.put(BraintreeApiName.PAYMENTMETHODNONCE, new ApiMethodHelper(PaymentMethodNonceGatewayApiMethod.class, aliases, nullableArgs));
        apiMethods.put(PaymentMethodNonceGatewayApiMethod.class, BraintreeApiName.PAYMENTMETHODNONCE);

        aliases.clear();
        nullableArgs = Arrays.asList();
        apiHelpers.put(BraintreeApiName.PLAN, new ApiMethodHelper(PlanGatewayApiMethod.class, aliases, nullableArgs));
        apiMethods.put(PlanGatewayApiMethod.class, BraintreeApiName.PLAN);

        aliases.clear();
        nullableArgs = Arrays.asList();
        apiHelpers.put(BraintreeApiName.REPORT, new ApiMethodHelper(ReportGatewayApiMethod.class, aliases, nullableArgs));
        apiMethods.put(ReportGatewayApiMethod.class, BraintreeApiName.REPORT);

        aliases.clear();
        nullableArgs = Arrays.asList();
        apiHelpers.put(BraintreeApiName.SETTLEMENTBATCHSUMMARY, new ApiMethodHelper(SettlementBatchSummaryGatewayApiMethod.class, aliases, nullableArgs));
        apiMethods.put(SettlementBatchSummaryGatewayApiMethod.class, BraintreeApiName.SETTLEMENTBATCHSUMMARY);

        aliases.clear();
        nullableArgs = Arrays.asList();
        apiHelpers.put(BraintreeApiName.SUBSCRIPTION, new ApiMethodHelper(SubscriptionGatewayApiMethod.class, aliases, nullableArgs));
        apiMethods.put(SubscriptionGatewayApiMethod.class, BraintreeApiName.SUBSCRIPTION);

        aliases.clear();
        nullableArgs = Arrays.asList();
        apiHelpers.put(BraintreeApiName.TRANSACTION, new ApiMethodHelper(TransactionGatewayApiMethod.class, aliases, nullableArgs));
        apiMethods.put(TransactionGatewayApiMethod.class, BraintreeApiName.TRANSACTION);

        aliases.clear();
        nullableArgs = Arrays.asList();
        apiHelpers.put(BraintreeApiName.WEBHOOKNOTIFICATION, new ApiMethodHelper(WebhookNotificationGatewayApiMethod.class, aliases, nullableArgs));
        apiMethods.put(WebhookNotificationGatewayApiMethod.class, BraintreeApiName.WEBHOOKNOTIFICATION);

        setApiHelpers(apiHelpers);
        setApiMethods(apiMethods);
    }

    public BraintreeConfiguration getEndpointConfiguration(BraintreeApiName apiName) {
        BraintreeConfiguration result = null;
        switch (apiName) {
        case ADDON:
            result = new AddOnGatewayEndpointConfiguration();
            break;
        case ADDRESS:
            result = new AddressGatewayEndpointConfiguration();
            break;
        case CLIENTTOKEN:
            result = new ClientTokenGatewayEndpointConfiguration();
            break;
        case CREDITCARDVERIFICATION:
            result = new CreditCardVerificationGatewayEndpointConfiguration();
            break;
        case CUSTOMER:
            result = new CustomerGatewayEndpointConfiguration();
            break;
        case DISCOUNT:
            result = new DiscountGatewayEndpointConfiguration();
            break;
        case DISPUTE:
            result = new DisputeGatewayEndpointConfiguration();
            break;
        case DOCUMENTUPLOAD:
            result = new DocumentUploadGatewayEndpointConfiguration();
            break;
        case MERCHANTACCOUNT:
            result = new MerchantAccountGatewayEndpointConfiguration();
            break;
        case PAYMENTMETHOD:
            result = new PaymentMethodGatewayEndpointConfiguration();
            break;
        case PAYMENTMETHODNONCE:
            result = new PaymentMethodNonceGatewayEndpointConfiguration();
            break;
        case PLAN:
            result = new PlanGatewayEndpointConfiguration();
            break;
        case REPORT:
            result = new ReportGatewayEndpointConfiguration();
            break;
        case SETTLEMENTBATCHSUMMARY:
            result = new SettlementBatchSummaryGatewayEndpointConfiguration();
            break;
        case SUBSCRIPTION:
            result = new SubscriptionGatewayEndpointConfiguration();
            break;
        case TRANSACTION:
            result = new TransactionGatewayEndpointConfiguration();
            break;
        case WEBHOOKNOTIFICATION:
            result = new WebhookNotificationGatewayEndpointConfiguration();
            break;
        }
        return result;
    }

    public static synchronized BraintreeApiCollection getCollection() {
        if (collection == null) {
            collection = new BraintreeApiCollection();
        }
        return collection;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy