commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
lib
commercetools-api
src
Client
Resource
ResourceByProjectKeyCustomObjects.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Client\Resource
;
10
11
use
Commercetools\Api\Models\CustomObject\CustomObjectDraft
;
12
use
Commercetools\Client\ApiResource
;
13
use GuzzleHttp\ClientInterface;
14
use Psr\Http\Message\UploadedFileInterface;
15
19
class
ResourceByProjectKeyCustomObjects
extends
ApiResource
20
{
24
public
function
__construct
(array $args = [], ClientInterface $client =
null
)
25
{
26
parent::__construct(
'/{projectKey}/custom-objects'
, $args, $client);
27
}
28
31
public
function
withContainerAndKey
(
string
$container =
null
,
string
$key =
null
):
ResourceByProjectKeyCustomObjectsByContainerByKey
32
{
33
$args = $this->
getArgs
();
34
if
(!is_null($container)) {
35
$args[
'container'
] = $container;
36
}
37
38
if
(!is_null($key)) {
39
$args[
'key'
] = $key;
40
}
41
42
return
new
ResourceByProjectKeyCustomObjectsByContainerByKey
($args, $this->
getClient
());
43
}
46
public
function
withContainer
(
string
$container =
null
):
ResourceByProjectKeyCustomObjectsByContainer
47
{
48
$args = $this->
getArgs
();
49
if
(!is_null($container)) {
50
$args[
'container'
] = $container;
51
}
52
53
return
new
ResourceByProjectKeyCustomObjectsByContainer
($args, $this->
getClient
());
54
}
55
61
public
function
get
($body =
null
, array $headers = []):
ByProjectKeyCustomObjectsGet
62
{
63
$args = $this->
getArgs
();
64
65
return
new
ByProjectKeyCustomObjectsGet
($args[
'projectKey'
], $body, $headers, $this->
getClient
());
66
}
71
public
function
head
($body =
null
, array $headers = []):
ByProjectKeyCustomObjectsHead
72
{
73
$args = $this->
getArgs
();
74
75
return
new
ByProjectKeyCustomObjectsHead
($args[
'projectKey'
], $body, $headers, $this->
getClient
());
76
}
81
public
function
post
(?
CustomObjectDraft
$body =
null
, array $headers = []):
ByProjectKeyCustomObjectsPost
82
{
83
$args = $this->
getArgs
();
84
85
return
new
ByProjectKeyCustomObjectsPost
($args[
'projectKey'
], $body, $headers, $this->
getClient
());
86
}
87
}
Commercetools\Api\Client\Resource\ByProjectKeyCustomObjectsGet
Definition
ByProjectKeyCustomObjectsGet.php:41
Commercetools\Api\Client\Resource\ByProjectKeyCustomObjectsHead
Definition
ByProjectKeyCustomObjectsHead.php:35
Commercetools\Api\Client\Resource\ByProjectKeyCustomObjectsPost
Definition
ByProjectKeyCustomObjectsPost.php:38
Commercetools\Api\Client\Resource\ResourceByProjectKeyCustomObjectsByContainerByKey
Definition
ResourceByProjectKeyCustomObjectsByContainerByKey.php:19
Commercetools\Api\Client\Resource\ResourceByProjectKeyCustomObjectsByContainer
Definition
ResourceByProjectKeyCustomObjectsByContainer.php:19
Commercetools\Api\Client\Resource\ResourceByProjectKeyCustomObjects
Definition
ResourceByProjectKeyCustomObjects.php:20
Commercetools\Api\Client\Resource\ResourceByProjectKeyCustomObjects\post
post(?CustomObjectDraft $body=null, array $headers=[])
Definition
ResourceByProjectKeyCustomObjects.php:81
Commercetools\Api\Client\Resource\ResourceByProjectKeyCustomObjects\head
head($body=null, array $headers=[])
Definition
ResourceByProjectKeyCustomObjects.php:71
Commercetools\Api\Client\Resource\ResourceByProjectKeyCustomObjects\withContainerAndKey
withContainerAndKey(string $container=null, string $key=null)
Definition
ResourceByProjectKeyCustomObjects.php:31
Commercetools\Api\Client\Resource\ResourceByProjectKeyCustomObjects\withContainer
withContainer(string $container=null)
Definition
ResourceByProjectKeyCustomObjects.php:46
Commercetools\Api\Client\Resource\ResourceByProjectKeyCustomObjects\__construct
__construct(array $args=[], ClientInterface $client=null)
Definition
ResourceByProjectKeyCustomObjects.php:24
Commercetools\Client\ApiResource
Definition
ApiResource.php:15
Commercetools\Client\ApiResource\getClient
getClient()
Definition
ApiResource.php:61
Commercetools\Client\ApiResource\getArgs
getArgs()
Definition
ApiResource.php:56
Commercetools\Api\Models\CustomObject\CustomObjectDraft
Definition
CustomObjectDraft.php:15
Commercetools\Api\Client\Resource
Definition
ByProjectKeyApiClientsByIDDelete.php:9
Generated by
1.9.8