commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
ResourceByProjectKeyMcpServers.php
1<?php
2
3declare(strict_types=1);
10
13use GuzzleHttp\ClientInterface;
14use Psr\Http\Message\UploadedFileInterface;
15
20{
24 public function __construct(array $args = [], ?ClientInterface $client = null)
25 {
26 parent::__construct('/{projectKey}/mcp-servers', $args, $client);
27 }
28
32 {
33 $args = $this->getArgs();
34
35 return new ResourceByProjectKeyMcpServersTypes($args, $this->getClient());
36 }
39 public function withKey(?string $key = null): ResourceByProjectKeyMcpServersKeyByKey
40 {
41 $args = $this->getArgs();
42 if (!is_null($key)) {
43 $args['key'] = $key;
44 }
45
46 return new ResourceByProjectKeyMcpServersKeyByKey($args, $this->getClient());
47 }
50 public function withId(?string $ID = null): ResourceByProjectKeyMcpServersByID
51 {
52 $args = $this->getArgs();
53 if (!is_null($ID)) {
54 $args['ID'] = $ID;
55 }
56
57 return new ResourceByProjectKeyMcpServersByID($args, $this->getClient());
58 }
59
64 public function get($body = null, array $headers = []): ByProjectKeyMcpServersGet
65 {
66 $args = $this->getArgs();
67
68 return new ByProjectKeyMcpServersGet($args['projectKey'], $body, $headers, $this->getClient());
69 }
74 public function post(?McpServerDraft $body = null, array $headers = []): ByProjectKeyMcpServersPost
75 {
76 $args = $this->getArgs();
77
78 return new ByProjectKeyMcpServersPost($args['projectKey'], $body, $headers, $this->getClient());
79 }
80}