<?php

namespace Fifa\ConnectId\Sdk\Tms\Validators;

use Fifa\ConnectId\Sdk\Model\Transfer\ProofOfPayment;
use Fifa\ConnectId\Sdk\Registration\ValidationException;

class ProofOfPaymentValidator
{
    /**
     * @param ProofOfPayment $proofOfPayment
     *
     * @throws ValidationException
     */
    public static function validate(ProofOfPayment $proofOfPayment)
    {
        if ($proofOfPayment == null) {
            throw new ValidationException('ProofOfPayment cannot be null.');
        }
        if ($proofOfPayment->PaymentDetails == null) {
            throw new ValidationException('PaymentDetails must be provided.');
        }
        if ($proofOfPayment->RecipientClub == null) {
            throw new ValidationException('RecipientClub must be provided.');
        }
    }
}