package com.braintree.facade.backoffice;

import com.braintree.command.result.BrainTreeAdjustedAuthorizationResult;
import com.braintree.exceptions.BraintreeErrorException;
import de.hybris.platform.core.model.order.OrderModel;
import de.hybris.platform.payment.model.PaymentTransactionEntryModel;

import java.math.BigDecimal;
import java.util.List;

public interface BraintreeBackofficeAdjustAuthorizationFacade {

    List<PaymentTransactionEntryModel> getAuthorizedTransactions(final OrderModel order);

    boolean isAdjustAuthorizationPossible(final OrderModel order);

    BrainTreeAdjustedAuthorizationResult adjustAuthorization(OrderModel orderModel, String transactionId,
                                                             BigDecimal amount) throws BraintreeErrorException;

    BigDecimal getAmountByTransactionId(final OrderModel orderModel, final String transactionId);

    BigDecimal getOriginalAmountByTransactionId(final OrderModel orderModel, final String transactionId);

}
