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
ResourceByProjectKeyMeCarts.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Client\Resource
;
10
11
use
Commercetools\Api\Models\Me\MyCartDraft
;
12
use
Commercetools\Client\ApiResource
;
13
use GuzzleHttp\ClientInterface;
14
use Psr\Http\Message\UploadedFileInterface;
15
19
class
ResourceByProjectKeyMeCarts
extends
ApiResource
20
{
24
public
function
__construct
(array $args = [], ClientInterface $client =
null
)
25
{
26
parent::__construct(
'/{projectKey}/me/carts'
, $args, $client);
27
}
28
31
public
function
withId
(
string
$ID =
null
):
ResourceByProjectKeyMeCartsByID
32
{
33
$args = $this->
getArgs
();
34
if
(!is_null($ID)) {
35
$args[
'ID'
] = $ID;
36
}
37
38
return
new
ResourceByProjectKeyMeCartsByID
($args, $this->
getClient
());
39
}
42
public
function
replicate
():
ResourceByProjectKeyMeCartsReplicate
43
{
44
$args = $this->
getArgs
();
45
46
return
new
ResourceByProjectKeyMeCartsReplicate
($args, $this->
getClient
());
47
}
48
53
public
function
get
($body =
null
, array $headers = []):
ByProjectKeyMeCartsGet
54
{
55
$args = $this->
getArgs
();
56
57
return
new
ByProjectKeyMeCartsGet
($args[
'projectKey'
], $body, $headers, $this->
getClient
());
58
}
63
public
function
head
($body =
null
, array $headers = []):
ByProjectKeyMeCartsHead
64
{
65
$args = $this->
getArgs
();
66
67
return
new
ByProjectKeyMeCartsHead
($args[
'projectKey'
], $body, $headers, $this->
getClient
());
68
}
73
public
function
post
(?
MyCartDraft
$body =
null
, array $headers = []):
ByProjectKeyMeCartsPost
74
{
75
$args = $this->
getArgs
();
76
77
return
new
ByProjectKeyMeCartsPost
($args[
'projectKey'
], $body, $headers, $this->
getClient
());
78
}
79
}
Commercetools\Api\Client\Resource\ByProjectKeyMeCartsGet
Definition
ByProjectKeyMeCartsGet.php:41
Commercetools\Api\Client\Resource\ByProjectKeyMeCartsHead
Definition
ByProjectKeyMeCartsHead.php:35
Commercetools\Api\Client\Resource\ByProjectKeyMeCartsPost
Definition
ByProjectKeyMeCartsPost.php:38
Commercetools\Api\Client\Resource\ResourceByProjectKeyMeCartsByID
Definition
ResourceByProjectKeyMeCartsByID.php:20
Commercetools\Api\Client\Resource\ResourceByProjectKeyMeCarts
Definition
ResourceByProjectKeyMeCarts.php:20
Commercetools\Api\Client\Resource\ResourceByProjectKeyMeCarts\post
post(?MyCartDraft $body=null, array $headers=[])
Definition
ResourceByProjectKeyMeCarts.php:73
Commercetools\Api\Client\Resource\ResourceByProjectKeyMeCarts\replicate
replicate()
Definition
ResourceByProjectKeyMeCarts.php:42
Commercetools\Api\Client\Resource\ResourceByProjectKeyMeCarts\__construct
__construct(array $args=[], ClientInterface $client=null)
Definition
ResourceByProjectKeyMeCarts.php:24
Commercetools\Api\Client\Resource\ResourceByProjectKeyMeCarts\withId
withId(string $ID=null)
Definition
ResourceByProjectKeyMeCarts.php:31
Commercetools\Api\Client\Resource\ResourceByProjectKeyMeCarts\head
head($body=null, array $headers=[])
Definition
ResourceByProjectKeyMeCarts.php:63
Commercetools\Api\Client\Resource\ResourceByProjectKeyMeCartsReplicate
Definition
ResourceByProjectKeyMeCartsReplicate.php:20
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\Me\MyCartDraft
Definition
MyCartDraft.php:21
Commercetools\Api\Client\Resource
Definition
ByProjectKeyApiClientsByIDDelete.php:9
Generated by
1.9.8