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

ApplePayStartSessionRequest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 24
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getRelativeUrl() 0 3 1
A createModel() 0 3 1
A getStrategy() 0 3 1
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