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 if (!is_null($key)) {
57 $args['key'] = $key;
58 }
59
60 if (!is_null($associateId)) {
61 $args['associateId'] = $associateId;
62 }
63
65 }
69 {
70 $args = $this->getArgs();
71 if (!is_null($businessUnitId)) {
72 $args['businessUnitId'] = $businessUnitId;
73 }
74
75 if (!is_null($associateId)) {
76 $args['associateId'] = $associateId;
77 }
78
80 }
84 {
85 $args = $this->getArgs();
86
87 return new ResourceByProjectKeyBusinessUnitsSearch($args, $this->getClient());
88 }
97
102 public function get($body = null, array $headers = []): ByProjectKeyBusinessUnitsGet
103 {
104 $args = $this->getArgs();
105
106 return new ByProjectKeyBusinessUnitsGet($args['projectKey'], $body, $headers, $this->getClient());
107 }
112 public function head($body = null, array $headers = []): ByProjectKeyBusinessUnitsHead
113 {
114 $args = $this->getArgs();
115
116 return new ByProjectKeyBusinessUnitsHead($args['projectKey'], $body, $headers, $this->getClient());
117 }
122 public function post(?BusinessUnitDraft $body = null, array $headers = []): ByProjectKeyBusinessUnitsPost
123 {
124 $args = $this->getArgs();
125
126 return new ByProjectKeyBusinessUnitsPost($args['projectKey'], $body, $headers, $this->getClient());
127 }
128}
withBusinessUnitIdValueAssociatesWithAssociateIdValue(?string $businessUnitId=null, ?string $associateId=null)
keyWithKeyValueAssociatesWithAssociateIdValue(?string $key=null, ?string $associateId=null)