| Total Complexity | 4 |
| Total Lines | 47 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | abstract class Base extends AbstractRequest |
||
| 14 | { |
||
| 15 | public const ROOT_TAG = 'request'; |
||
| 16 | public const CONTENT = 'content'; |
||
| 17 | |||
| 18 | public const OPERATION = ''; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var \SprykerEco\Zed\Ratepay\Business\Api\Builder\HeadInterface |
||
| 22 | */ |
||
| 23 | protected $head; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @param \SprykerEco\Zed\Ratepay\Business\Api\Builder\HeadInterface $head |
||
| 27 | */ |
||
| 28 | public function __construct(HeadInterface $head) |
||
| 29 | { |
||
| 30 | $this->head = $head; |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @return array |
||
| 35 | */ |
||
| 36 | protected function buildData() |
||
| 37 | { |
||
| 38 | $this->getHead()->setOperation(static::OPERATION); |
||
| 39 | return [ |
||
| 40 | '@version' => RatepayConfig::RATEPAY_REQUEST_VERSION, |
||
| 41 | '@xmlns' => RatepayConfig::RATEPAY_REQUEST_XMLNS_URN, |
||
| 42 | $this->getHead()->getRootTag() => $this->getHead(), |
||
| 43 | ]; |
||
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @return string |
||
| 48 | */ |
||
| 49 | public function getRootTag() |
||
| 52 | } |
||
| 53 | |||
| 54 | /** |
||
| 55 | * @return \SprykerEco\Zed\Ratepay\Business\Api\Builder\HeadInterface |
||
| 56 | */ |
||
| 57 | public function getHead() |
||
| 60 | } |
||
| 61 | } |
||
| 62 |