package com.braintree.converters.populators.configuration.style;

import com.braintree.hybris.data.PayPalButtonStyleData;
import de.hybris.platform.converters.Populator;
import de.hybris.platform.core.model.BraintreePayPalStylesConfigurationModel;
import de.hybris.platform.servicelayer.dto.converter.ConversionException;

public class BraintreePayPalStyleConfigurationPopulator implements Populator<BraintreePayPalStylesConfigurationModel, PayPalButtonStyleData> {

    @Override
    public void populate(BraintreePayPalStylesConfigurationModel model, PayPalButtonStyleData data) throws ConversionException {
        data.setLayout(model.getLayout().name().toLowerCase());
        data.setColor(model.getColor().name().toLowerCase());
        data.setShape(model.getShape().name().toLowerCase());
        data.setLabel(model.getLabel().name().toLowerCase());
        data.setLocation(model.getLocation().name().toLowerCase());
        data.setHeight(model.getHeight());
        data.setTagline(model.isTagline());
    }
}
