commercetools-sdk-php-v2  master
The platform, import-api and ml-api PHP sdks generated from our api reference.
HistoryRequestBuilder.php
1 <?php
2 
3 namespace Commercetools\Client;
4 
7 use GuzzleHttp\ClientInterface;
8 
9 class HistoryRequestBuilder extends Builder
10 {
14  private $projectKey;
15 
19  public function __construct(string $projectKey, ClientInterface $client, array $args = [])
20  {
21  parent::__construct($client, $args);
22  $this->projectKey = $projectKey;
23  }
24 
25  public function with(): Resource\ResourceByProjectKey
26  {
27  return $this->withProjectKeyValue($this->projectKey);
28  }
29 
34  public function get($body = null, array $headers = []): Resource\ByProjectKeyGet
35  {
36  return $this->with()->get($body, $headers);
37  }
38 
39  public function resourceType(string $resourceType): Resource\ResourceByProjectKeyByResourceType
40  {
41  return $this->with()->withResourceTypeValue($resourceType);
42  }
43 }
__construct(string $projectKey, ClientInterface $client, array $args=[])