commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
ResourceByProjectKeyShippingMethods.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}/shipping-methods', $args, $client);
27 }
28
31 public function withKey(string $key = null): ResourceByProjectKeyShippingMethodsKeyByKey
32 {
33 $args = $this->getArgs();
34 if (!is_null($key)) {
35 $args['key'] = $key;
36 }
37
39 }
43 {
44 $args = $this->getArgs();
45
47 }
74 public function withId(string $ID = null): ResourceByProjectKeyShippingMethodsByID
75 {
76 $args = $this->getArgs();
77 if (!is_null($ID)) {
78 $args['ID'] = $ID;
79 }
80
81 return new ResourceByProjectKeyShippingMethodsByID($args, $this->getClient());
82 }
83
88 public function get($body = null, array $headers = []): ByProjectKeyShippingMethodsGet
89 {
90 $args = $this->getArgs();
91
92 return new ByProjectKeyShippingMethodsGet($args['projectKey'], $body, $headers, $this->getClient());
93 }
98 public function head($body = null, array $headers = []): ByProjectKeyShippingMethodsHead
99 {
100 $args = $this->getArgs();
101
102 return new ByProjectKeyShippingMethodsHead($args['projectKey'], $body, $headers, $this->getClient());
103 }
108 public function post(?ShippingMethodDraft $body = null, array $headers = []): ByProjectKeyShippingMethodsPost
109 {
110 $args = $this->getArgs();
111
112 return new ByProjectKeyShippingMethodsPost($args['projectKey'], $body, $headers, $this->getClient());
113 }
114}