<?php

namespace Bixo\Payment\Policies;

use Illuminate\Foundation\Auth\User as Authenticatable;

trait RefundExim
{

    /**
     * Determine if the given user can approve the given refund.
     *
     * @param Authenticatable $user
     *
     * @return bool
     */
    public function import(Authenticatable $user)
    {
        if ($user->canDo('payment.refund.import')) {
            return true;
        }

        return false;
    }

    /**
     * Determine if the given user can approve the given refund.
     *
     * @param Authenticatable $user
     *
     * @return bool
     */
    public function export(Authenticatable $user)
    {
        if ($user->canDo('payment.refund.export')) {
            return true;
        }

        return false;
    }
}