commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
ResourceByProjectKeyStates.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}/states', $args, $client);
27 }
28
31 public function withKey(string $key = null): ResourceByProjectKeyStatesKeyByKey
32 {
33 $args = $this->getArgs();
34 if (!is_null($key)) {
35 $args['key'] = $key;
36 }
37
38 return new ResourceByProjectKeyStatesKeyByKey($args, $this->getClient());
39 }
42 public function withId(string $ID = null): ResourceByProjectKeyStatesByID
43 {
44 $args = $this->getArgs();
45 if (!is_null($ID)) {
46 $args['ID'] = $ID;
47 }
48
49 return new ResourceByProjectKeyStatesByID($args, $this->getClient());
50 }
51
56 public function get($body = null, array $headers = []): ByProjectKeyStatesGet
57 {
58 $args = $this->getArgs();
59
60 return new ByProjectKeyStatesGet($args['projectKey'], $body, $headers, $this->getClient());
61 }
66 public function head($body = null, array $headers = []): ByProjectKeyStatesHead
67 {
68 $args = $this->getArgs();
69
70 return new ByProjectKeyStatesHead($args['projectKey'], $body, $headers, $this->getClient());
71 }
76 public function post(?StateDraft $body = null, array $headers = []): ByProjectKeyStatesPost
77 {
78 $args = $this->getArgs();
79
80 return new ByProjectKeyStatesPost($args['projectKey'], $body, $headers, $this->getClient());
81 }
82}