| Total Complexity | 8 |
| Total Lines | 72 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | class Request extends AbstractMessage implements RequestInterface |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * Constructs the request with provided parameters. |
||
| 17 | * |
||
| 18 | * @param array $parameters The request parameters. |
||
| 19 | */ |
||
| 20 | public function __construct(array $parameters) |
||
| 21 | { |
||
| 22 | $this->parameters = $parameters; |
||
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @inheritDoc |
||
| 27 | */ |
||
| 28 | public function getMerchantId(): ?string |
||
| 29 | { |
||
| 30 | return $this->getParameter('mid'); |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @inheritDoc |
||
| 35 | */ |
||
| 36 | public function getPortalId(): ?string |
||
| 37 | { |
||
| 38 | return $this->getParameter('portalid'); |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @inheritDoc |
||
| 43 | */ |
||
| 44 | public function getApiVersion(): ?string |
||
| 45 | { |
||
| 46 | return $this->getParameter('api_version'); |
||
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @inheritDoc |
||
| 51 | */ |
||
| 52 | public function getMode(): ?string |
||
| 55 | } |
||
| 56 | |||
| 57 | /** |
||
| 58 | * @inheritDoc |
||
| 59 | */ |
||
| 60 | protected function generateState(): array |
||
| 68 | } |
||
| 69 | |||
| 70 | /** |
||
| 71 | * @inheritDoc |
||
| 72 | */ |
||
| 73 | public function applyParameters(array $parameters): void |
||
| 74 | { |
||
| 75 | // Merge request parameters with provided parameters. |
||
| 76 | $this->parameters = array_merge($this->parameters, $parameters); |
||
| 77 | } |
||
| 78 | |||
| 79 | /** |
||
| 80 | * @inheritDoc |
||
| 81 | */ |
||
| 82 | public function makeParameterArray(): array |
||
| 85 | } |
||
| 86 | } |
||
| 87 |