package com.braintree.populators;

import com.braintree.command.result.BrainTreeRefundTransactionResult;
import com.braintreegateway.Transaction;
import de.hybris.platform.converters.Populator;
import de.hybris.platform.servicelayer.dto.converter.ConversionException;

public class TransactionToBrainTreeRefundTransactionResultPopulator implements
        Populator<Transaction, BrainTreeRefundTransactionResult> {
    @Override
    public void populate(Transaction transaction, BrainTreeRefundTransactionResult brainTreeRefundTransactionResult)
            throws ConversionException {
        brainTreeRefundTransactionResult.setTransactionId(transaction.getId());
        brainTreeRefundTransactionResult.setTransactionGraphQLId(transaction.getGraphQLId());
        brainTreeRefundTransactionResult.setAmount(transaction.getAmount());
    }
}
