GetSubscriptionRequest   A
last analyzed

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\Response\SubscriptionResponse;
9
use Korobovn\CloudPayments\Message\Strategy\StrategyInterface;
10
use Korobovn\CloudPayments\Message\Strategy\SubscriptionStrategy;
11
use Korobovn\CloudPayments\Message\Response\InvalidRequestResponse;
12
use Korobovn\CloudPayments\Message\Request\Model\GetSubscriptionModel;
13
14
/**
15
 * @method GetSubscriptionModel getModel()
16
 * @method InvalidRequestResponse|SubscriptionResponse send()
17
 * @method static GetSubscriptionRequest create()
18
 *
19
 * @see https://developers.cloudpayments.ru/#zapros-informatsii-o-podpiske
20
 */
21
class GetSubscriptionRequest extends AbstractRequest
22
{
23
    /**
24
     * {@inheritDoc}
25
     */
26
    protected function getRelativeUrl(): string
27
    {
28
        return '/subscriptions/get';
29
    }
30
31
    /**
32
     * {@inheritDoc}
33
     */
34
    public function createModel(): ModelInterface
35
    {
36
        return new GetSubscriptionModel;
37
    }
38
39
    /**
40
     * {@inheritDoc}
41
     */
42
    public function getStrategy(): StrategyInterface
43
    {
44
        return new SubscriptionStrategy;
45
    }
46
}
47