Get::getRequest()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 2
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
nc 1
nop 0
1
<?php
2
declare(strict_types=1);
3
4
/**
5
 * Request Provider Class
6
 * @category    Ticaje
7
 * @author      Max Demian <[email protected]>
8
 */
9
10
namespace Ticaje\AeSdk\Domain\Endpoint\Solution\Promise\Template;
11
12
use Ticaje\Contract\Patterns\Interfaces\Pool\WorkerInterface;
13
use Ticaje\Contract\Traits\BaseDto;
14
15
use Ticaje\AeSdk\Infrastructure\Builder\ServiceRequestBuilder;
16
use Ticaje\AeSdk\Domain\Interfaces\Request\ServiceRequestInterface;
17
18
/**
19
 * Class Get
20
 * @package Ticaje\AeSdk\Domain\Endpoint\Solution\Freight\Template
21
 * @todo Still to define AE API, not sure we got the right one
22
 */
23
class Get implements ServiceRequestInterface, WorkerInterface
24
{
25
    use BaseDto, ServiceRequestBuilder;
26
27
    private $apiMethodName = 'aliexpress.postproduct.redefining.querypromisetemplatebyid';
0 ignored issues
show
introduced by
The private property $apiMethodName is not used, and could be removed.
Loading history...
28
29
    private $templateId = '-1';
0 ignored issues
show
introduced by
The private property $templateId is not used, and could be removed.
Loading history...
30
    /**
31
     * @inheritDoc
32
     * Empty request since contains no params according to AE policies
33
     */
34
    public function getRequest(): array
35
    {
36
        $result = ['param0' => json_encode($this->build())];
37
        return $result;
38
    }
39
}
40