-
Notifications
You must be signed in to change notification settings - Fork 44
/
Context.php
44 lines (33 loc) · 1.19 KB
/
Context.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php declare(strict_types=1);
namespace Vin\ShopwareSdk\Data;
class Context
{
use EndPointTrait;
public string $languageId = Defaults::LANGUAGE_SYSTEM;
public string $currencyId = Defaults::CURRENCY;
public string $versionId = Defaults::LIVE_VERSION;
public bool $compatibility = true;
public bool $inheritance = true;
public AccessToken $accessToken;
public string $apiEndpoint;
public array $additionalHeaders;
public function __construct(
string $apiEndpoint,
AccessToken $accessToken,
string $languageId = Defaults::LANGUAGE_SYSTEM,
string $currencyId = Defaults::CURRENCY,
string $versionId = Defaults::LIVE_VERSION,
bool $compatibility = true,
bool $inheritance = true,
array $additionalHeaders = []
) {
$this->languageId = $languageId;
$this->currencyId = $currencyId;
$this->versionId = $versionId;
$this->compatibility = $compatibility;
$this->inheritance = $inheritance;
$this->accessToken = $accessToken;
$this->apiEndpoint = $this->removeLastSlashes($apiEndpoint);
$this->additionalHeaders = $additionalHeaders;
}
}