Total Complexity | 5 |
Total Lines | 56 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
9 | class Update implements RequestInterface |
||
10 | { |
||
11 | const ENDPOINT = '/sobjects/%s/%s/'; |
||
12 | |||
13 | /** |
||
14 | * @var AbstractSObjectType |
||
15 | */ |
||
16 | protected $objectType; |
||
17 | |||
18 | /** |
||
19 | * @var string |
||
20 | */ |
||
21 | protected $id; |
||
22 | |||
23 | /** |
||
24 | * @var array |
||
25 | */ |
||
26 | protected $params; |
||
27 | |||
28 | 2 | public function __construct(AbstractSObjectType $objectType, string $id, array $params = []) |
|
29 | { |
||
30 | 2 | $this->objectType = $objectType; |
|
31 | 2 | $this->id = $id; |
|
32 | 2 | $this->params = $params; |
|
33 | 2 | } |
|
34 | |||
35 | /** |
||
36 | * {@inheritdoc} |
||
37 | */ |
||
38 | 1 | public function getEndpoint(): string |
|
41 | } |
||
42 | |||
43 | /** |
||
44 | * {@inheritdoc} |
||
45 | */ |
||
46 | 1 | public function getMethod(): RequestMethod |
|
47 | { |
||
48 | 1 | return RequestMethod::PATCH(); |
|
49 | } |
||
50 | |||
51 | /** |
||
52 | * {@inheritdoc} |
||
53 | */ |
||
54 | 1 | public function getParams(): array |
|
55 | { |
||
56 | 1 | return $this->params; |
|
57 | } |
||
58 | |||
59 | /** |
||
60 | * {@inheritdoc} |
||
61 | */ |
||
62 | 1 | public function getContentType(): ContentType |
|
65 | } |
||
66 | } |
||
67 |