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
ResourceByProjectKeyCarts.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Client\Resource
;
10
11
use
Commercetools\Api\Models\Cart\CartDraft
;
12
use
Commercetools\Client\ApiResource
;
13
use GuzzleHttp\ClientInterface;
14
use Psr\Http\Message\UploadedFileInterface;
15
19
class
ResourceByProjectKeyCarts
extends
ApiResource
20
{
24
public
function
__construct
(array $args = [], ClientInterface $client =
null
)
25
{
26
parent::__construct(
'/{projectKey}/carts'
, $args, $client);
27
}
28
31
public
function
replicate
():
ResourceByProjectKeyCartsReplicate
32
{
33
$args = $this->
getArgs
();
34
35
return
new
ResourceByProjectKeyCartsReplicate
($args, $this->
getClient
());
36
}
39
public
function
withCustomerId
(
string
$customerId =
null
):
ResourceByProjectKeyCartsCustomerIdByCustomerId
40
{
41
$args = $this->
getArgs
();
42
if
(!is_null($customerId)) {
43
$args[
'customerId'
] = $customerId;
44
}
45
46
return
new
ResourceByProjectKeyCartsCustomerIdByCustomerId
($args, $this->
getClient
());
47
}
50
public
function
withKey
(
string
$key =
null
):
ResourceByProjectKeyCartsKeyByKey
51
{
52
$args = $this->
getArgs
();
53
if
(!is_null($key)) {
54
$args[
'key'
] = $key;
55
}
56
57
return
new
ResourceByProjectKeyCartsKeyByKey
($args, $this->
getClient
());
58
}
61
public
function
withId
(
string
$ID =
null
):
ResourceByProjectKeyCartsByID
62
{
63
$args = $this->
getArgs
();
64
if
(!is_null($ID)) {
65
$args[
'ID'
] = $ID;
66
}
67
68
return
new
ResourceByProjectKeyCartsByID
($args, $this->
getClient
());
69
}
70
75
public
function
get
($body =
null
, array $headers = []):
ByProjectKeyCartsGet
76
{
77
$args = $this->
getArgs
();
78
79
return
new
ByProjectKeyCartsGet
($args[
'projectKey'
], $body, $headers, $this->
getClient
());
80
}
85
public
function
head
($body =
null
, array $headers = []):
ByProjectKeyCartsHead
86
{
87
$args = $this->
getArgs
();
88
89
return
new
ByProjectKeyCartsHead
($args[
'projectKey'
], $body, $headers, $this->
getClient
());
90
}
95
public
function
post
(?
CartDraft
$body =
null
, array $headers = []):
ByProjectKeyCartsPost
96
{
97
$args = $this->
getArgs
();
98
99
return
new
ByProjectKeyCartsPost
($args[
'projectKey'
], $body, $headers, $this->
getClient
());
100
}
101
}
Commercetools\Api\Client\Resource\ByProjectKeyCartsGet
Definition
ByProjectKeyCartsGet.php:41
Commercetools\Api\Client\Resource\ByProjectKeyCartsHead
Definition
ByProjectKeyCartsHead.php:35
Commercetools\Api\Client\Resource\ByProjectKeyCartsPost
Definition
ByProjectKeyCartsPost.php:38
Commercetools\Api\Client\Resource\ResourceByProjectKeyCartsByID
Definition
ResourceByProjectKeyCartsByID.php:20
Commercetools\Api\Client\Resource\ResourceByProjectKeyCartsCustomerIdByCustomerId
Definition
ResourceByProjectKeyCartsCustomerIdByCustomerId.php:19
Commercetools\Api\Client\Resource\ResourceByProjectKeyCarts
Definition
ResourceByProjectKeyCarts.php:20
Commercetools\Api\Client\Resource\ResourceByProjectKeyCarts\post
post(?CartDraft $body=null, array $headers=[])
Definition
ResourceByProjectKeyCarts.php:95
Commercetools\Api\Client\Resource\ResourceByProjectKeyCarts\withKey
withKey(string $key=null)
Definition
ResourceByProjectKeyCarts.php:50
Commercetools\Api\Client\Resource\ResourceByProjectKeyCarts\__construct
__construct(array $args=[], ClientInterface $client=null)
Definition
ResourceByProjectKeyCarts.php:24
Commercetools\Api\Client\Resource\ResourceByProjectKeyCarts\withCustomerId
withCustomerId(string $customerId=null)
Definition
ResourceByProjectKeyCarts.php:39
Commercetools\Api\Client\Resource\ResourceByProjectKeyCarts\replicate
replicate()
Definition
ResourceByProjectKeyCarts.php:31
Commercetools\Api\Client\Resource\ResourceByProjectKeyCarts\withId
withId(string $ID=null)
Definition
ResourceByProjectKeyCarts.php:61
Commercetools\Api\Client\Resource\ResourceByProjectKeyCarts\head
head($body=null, array $headers=[])
Definition
ResourceByProjectKeyCarts.php:85
Commercetools\Api\Client\Resource\ResourceByProjectKeyCartsKeyByKey
Definition
ResourceByProjectKeyCartsKeyByKey.php:20
Commercetools\Api\Client\Resource\ResourceByProjectKeyCartsReplicate
Definition
ResourceByProjectKeyCartsReplicate.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\Cart\CartDraft
Definition
CartDraft.php:22
Commercetools\Api\Client\Resource
Definition
ByProjectKeyApiClientsByIDDelete.php:9
Generated by
1.9.8