Completed
Push — master ( 1ed802...c2e7e3 )
by Josef
02:51
created

InvalidPaymentException::getRequest()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace SlevomatCsobGateway\Api;
4
5
use SlevomatCsobGateway\Call\ProcessPaymentRequest;
6
7
class InvalidPaymentException extends RequestException
8
{
9
10
	/** @var ProcessPaymentRequest */
11
	private $request;
12
13
	/**
14
	 * @param ProcessPaymentRequest $request
15
	 * @param Response $response
16
	 * @param string $payId
17
	 */
18
	public function __construct(ProcessPaymentRequest $request, Response $response, $payId)
19
	{
20
		parent::__construct(sprintf('PayId %s is invalid or expired.', $payId), $response);
21
		$this->request = $request;
22
	}
23
24
	/**
25
	 * @return ProcessPaymentRequest
26
	 */
27
	public function getRequest()
28
	{
29
		return $this->request;
30
	}
31
32
}
33