Completed
Push — master ( ee7786...e4569e )
by Nikolay
53:54 queued 26s
created

ApplePayStartSessionRequest::getRelativeUrl()   A

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
 *
15
 * @see https://developers.cloudpayments.ru/#zapusk-sessii-dlya-oplaty-cherez-apple-pay
16
 */
17
class ApplePayStartSessionRequest extends AbstractRequest
18
{
19
    /**
20
     * {@inheritDoc}
21
     */
22
    protected function getRelativeUrl(): string
23
    {
24
        return '/applepay/startsession';
25
    }
26
27
    /**
28
     * {@inheritDoc}
29
     */
30
    public function createModel(): ModelInterface
31
    {
32
        return new ApplePayStartSessionModel;
33
    }
34
35
    /**
36
     * {@inheritDoc}
37
     */
38
    public function getStrategy(): StrategyInterface
39
    {
40
        return new ApplePayStartSessionStrategy;
41
    }
42
}
43