ApplePayStartSessionRequest::createModel()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace Korobovn\CloudPayments\Message\Request;
6
7
use Korobovn\CloudPayments\Message\Request\Model\ModelInterface;
8
use Korobovn\CloudPayments\Message\Strategy\ApplePayStartSessionStrategy;
9
use Korobovn\CloudPayments\Message\Request\Model\ApplePayStartSessionModel;
10
use Korobovn\CloudPayments\Message\Strategy\StrategyInterface;
11
12
/**
13
 * @method ApplePayStartSessionModel getModel()
14
 * @method static ApplePayStartSessionRequest create()
15
 *
16
 * @see https://developers.cloudpayments.ru/#zapusk-sessii-dlya-oplaty-cherez-apple-pay
17
 */
18
class ApplePayStartSessionRequest extends AbstractRequest
19
{
20
    /**
21
     * {@inheritDoc}
22
     */
23
    protected function getRelativeUrl(): string
24
    {
25
        return '/applepay/startsession';
26
    }
27
28
    /**
29
     * {@inheritDoc}
30
     */
31
    public function createModel(): ModelInterface
32
    {
33
        return new ApplePayStartSessionModel;
34
    }
35
36
    /**
37
     * {@inheritDoc}
38
     */
39
    public function getStrategy(): StrategyInterface
40
    {
41
        return new ApplePayStartSessionStrategy;
42
    }
43
}
44