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

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

public class BraintreeGooglePayStyleConfigurationPopulator implements Populator<BraintreeGooglePayStylesConfigurationModel, GooglePayButtonStyleData> {

    @Override
    public void populate(BraintreeGooglePayStylesConfigurationModel model, GooglePayButtonStyleData data) throws ConversionException {
        data.setType(model.getType().name().toLowerCase());
        data.setSize(model.getSize().name().toLowerCase());
        data.setLocation(model.getLocation().name().toLowerCase());
    }
}
