commercetools-sdk-php-v2  master
The platform, import-api and ml-api PHP sdks generated from our api reference.
ResourceByProjectKeyProductProjections.php
1 <?php
2 
3 declare(strict_types=1);
10 
12 use GuzzleHttp\ClientInterface;
13 use Psr\Http\Message\UploadedFileInterface;
14 
19 {
23  public function __construct(array $args = [], ClientInterface $client = null)
24  {
25  parent::__construct('/{projectKey}/product-projections', $args, $client);
26  }
27 
31  {
32  $args = $this->getArgs();
33 
34  return new ResourceByProjectKeyProductProjectionsSearch($args, $this->getClient());
35  }
39  {
40  $args = $this->getArgs();
41 
42  return new ResourceByProjectKeyProductProjectionsSuggest($args, $this->getClient());
43  }
46  public function withKey(string $key = null): ResourceByProjectKeyProductProjectionsKeyByKey
47  {
48  $args = $this->getArgs();
49  if (!is_null($key)) {
50  $args['key'] = $key;
51  }
52 
54  }
57  public function withId(string $ID = null): ResourceByProjectKeyProductProjectionsByID
58  {
59  $args = $this->getArgs();
60  if (!is_null($ID)) {
61  $args['ID'] = $ID;
62  }
63 
64  return new ResourceByProjectKeyProductProjectionsByID($args, $this->getClient());
65  }
66 
71  public function get($body = null, array $headers = []): ByProjectKeyProductProjectionsGet
72  {
73  $args = $this->getArgs();
74 
75  return new ByProjectKeyProductProjectionsGet($args['projectKey'], $body, $headers, $this->getClient());
76  }
81  public function head($body = null, array $headers = []): ByProjectKeyProductProjectionsHead
82  {
83  $args = $this->getArgs();
84 
85  return new ByProjectKeyProductProjectionsHead($args['projectKey'], $body, $headers, $this->getClient());
86  }
87 }