commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
ResourceByProjectKeyBusinessUnits.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}/business-units', $args, $client);
27 }
28
31 public function withKey(string $key = null): ResourceByProjectKeyBusinessUnitsKeyByKey
32 {
33 $args = $this->getArgs();
34 if (!is_null($key)) {
35 $args['key'] = $key;
36 }
37
38 return new ResourceByProjectKeyBusinessUnitsKeyByKey($args, $this->getClient());
39 }
42 public function withId(string $ID = null): ResourceByProjectKeyBusinessUnitsByID
43 {
44 $args = $this->getArgs();
45 if (!is_null($ID)) {
46 $args['ID'] = $ID;
47 }
48
49 return new ResourceByProjectKeyBusinessUnitsByID($args, $this->getClient());
50 }
54 {
55 $args = $this->getArgs();
56
57 return new ResourceByProjectKeyBusinessUnitsSearch($args, $this->getClient());
58 }
67
72 public function get($body = null, array $headers = []): ByProjectKeyBusinessUnitsGet
73 {
74 $args = $this->getArgs();
75
76 return new ByProjectKeyBusinessUnitsGet($args['projectKey'], $body, $headers, $this->getClient());
77 }
82 public function head($body = null, array $headers = []): ByProjectKeyBusinessUnitsHead
83 {
84 $args = $this->getArgs();
85
86 return new ByProjectKeyBusinessUnitsHead($args['projectKey'], $body, $headers, $this->getClient());
87 }
92 public function post(?BusinessUnitDraft $body = null, array $headers = []): ByProjectKeyBusinessUnitsPost
93 {
94 $args = $this->getArgs();
95
96 return new ByProjectKeyBusinessUnitsPost($args['projectKey'], $body, $headers, $this->getClient());
97 }
98}