package com.braintree.strategy.impl;

import de.hybris.platform.core.model.order.AbstractOrderEntryModel;
import de.hybris.platform.ordersplitting.model.ConsignmentModel;
import de.hybris.platform.ordersplitting.strategy.AbstractSplittingStrategy;
import de.hybris.platform.storelocator.model.PointOfServiceModel;


public class BrainTreeSplitByPoS extends AbstractSplittingStrategy {

    @Override
    public Object getGroupingObject(final AbstractOrderEntryModel orderEntry) {
        return orderEntry.getDeliveryPointOfService();
    }

    @Override
    public void afterSplitting(final Object groupingObject, final ConsignmentModel consignmentModel) {
        consignmentModel.setDeliveryPointOfService((PointOfServiceModel) groupingObject);
    }

}
