<?php

namespace KrokedilSwedbankPayDeps\SwedbankPay\Api\Service\MobilePay\Request;

use KrokedilSwedbankPayDeps\SwedbankPay\Api\Service\Base\Request\Test as BaseTest;
use KrokedilSwedbankPayDeps\SwedbankPay\Api\Service\MobilePay\Resource\Request\PaymentPayeeInfo;
use KrokedilSwedbankPayDeps\SwedbankPay\Api\Service\MobilePay\Resource\Request\Payment;
use KrokedilSwedbankPayDeps\SwedbankPay\Api\Service\MobilePay\Resource\Request\PaymentObject;
use KrokedilSwedbankPayDeps\SwedbankPay\Api\Client\Exception;
class Test extends BaseTest
{
    /**
     * Test constructor.
     * @param string $accessToken
     * @param string $payeeId
     * @param bool $isTest
     * @throws Exception
     */
    public function __construct($accessToken, $payeeId, $isTest)
    {
        $payeeInfo = new PaymentPayeeInfo();
        $payeeInfo->setPayeeId($payeeId);
        $payment = new Payment();
        $payment->setOperation('Test')->setPayeeInfo($payeeInfo);
        $paymentObject = new PaymentObject();
        $paymentObject->setPayment($payment);
        $request = new Purchase($paymentObject);
        $this->sendRequest($accessToken, $payeeId, $isTest, $request);
    }
}
