Skip to content

Commit 7a142d8

Browse files
authored
SupportPal v5 support (#175)
* Add favicon_dark_mode Caused by array ( 'SupportPal\\ApiClient\\Model\\Core\\Brand' => array ( 'getFaviconDarkMode' => array ( 0 => 'NULL', ), ), ) Failed asserting that an array is empty. * frontend and operator template mode removed in v5 so attributes return null * add new id attribute to translation tables * user confirmed attribute renamed to email_verified * add channel show_on_frontend (added in v4) * add ticket frontend_url and operator_url * update test coverage * add id to user custom field translation data
1 parent ac0d7f5 commit 7a142d8

36 files changed

Lines changed: 511 additions & 17 deletions

src/Model/Core/Brand.php

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ class Brand extends BaseModel
4646
*/
4747
private $favicon;
4848

49+
/**
50+
* @var string|null
51+
* @SerializedName("favicon_dark_mode")
52+
*/
53+
private $faviconDarkMode;
54+
4955
/**
5056
* @var string|null
5157
* @SerializedName("smtp_username")
@@ -59,7 +65,7 @@ class Brand extends BaseModel
5965
private $defaultCountry;
6066

6167
/**
62-
* @var int
68+
* @var int|null
6369
* @SerializedName("frontend_template_mode")
6470
*/
6571
private $frontendTemplateMode;
@@ -215,7 +221,7 @@ class Brand extends BaseModel
215221
private $languageToggle;
216222

217223
/**
218-
* @var int
224+
* @var int|null
219225
* @SerializedName("operator_template_mode")
220226
*/
221227
private $operatorTemplateMode;
@@ -301,6 +307,25 @@ public function setFavicon(?string $favicon): self
301307
return $this;
302308
}
303309

310+
/**
311+
* @return string|null
312+
*/
313+
public function getFaviconDarkMode(): ?string
314+
{
315+
return $this->faviconDarkMode;
316+
}
317+
318+
/**
319+
* @param string|null $favicon
320+
* @return self
321+
*/
322+
public function setFaviconDarkMode(?string $favicon): self
323+
{
324+
$this->faviconDarkMode = $favicon;
325+
326+
return $this;
327+
}
328+
304329
/**
305330
* @return string|null
306331
*/
@@ -340,18 +365,18 @@ public function setDefaultCountry(string $defaultCountry): self
340365
}
341366

342367
/**
343-
* @return int
368+
* @return int|null
344369
*/
345-
public function getFrontendTemplateMode(): int
370+
public function getFrontendTemplateMode(): ?int
346371
{
347372
return $this->frontendTemplateMode;
348373
}
349374

350375
/**
351-
* @param int $frontendTemplateMode
376+
* @param int|null $frontendTemplateMode
352377
* @return self
353378
*/
354-
public function setFrontendTemplateMode(int $frontendTemplateMode): self
379+
public function setFrontendTemplateMode(?int $frontendTemplateMode): self
355380
{
356381
$this->frontendTemplateMode = $frontendTemplateMode;
357382

@@ -815,18 +840,18 @@ public function setLanguageToggle(int $languageToggle): self
815840
}
816841

817842
/**
818-
* @return int
843+
* @return int|null
819844
*/
820-
public function getOperatorTemplateMode(): int
845+
public function getOperatorTemplateMode(): ?int
821846
{
822847
return $this->operatorTemplateMode;
823848
}
824849

825850
/**
826-
* @param int $operatorTemplateMode
851+
* @param int|null $operatorTemplateMode
827852
* @return self
828853
*/
829-
public function setOperatorTemplateMode(int $operatorTemplateMode): self
854+
public function setOperatorTemplateMode(?int $operatorTemplateMode): self
830855
{
831856
$this->operatorTemplateMode = $operatorTemplateMode;
832857

src/Model/Core/BrandTranslation.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77

88
class BrandTranslation extends BaseTranslation
99
{
10+
/**
11+
* @var int
12+
* @SerializedName("id")
13+
*/
14+
private $id;
15+
1016
/**
1117
* @var string
1218
* @SerializedName("name")
@@ -19,6 +25,25 @@ class BrandTranslation extends BaseTranslation
1925
*/
2026
private $brandId;
2127

28+
/**
29+
* @return int
30+
*/
31+
public function getId(): int
32+
{
33+
return $this->id;
34+
}
35+
36+
/**
37+
* @param int $id
38+
* @return $this
39+
*/
40+
public function setId(int $id): self
41+
{
42+
$this->id = $id;
43+
44+
return $this;
45+
}
46+
2247
/**
2348
* @return string
2449
*/

src/Model/Department/DepartmentTranslation.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77

88
class DepartmentTranslation extends BaseTranslation
99
{
10+
/**
11+
* @var int
12+
* @SerializedName("id")
13+
*/
14+
private $id;
15+
1016
/**
1117
* @var string
1218
* @SerializedName("name")
@@ -25,6 +31,25 @@ class DepartmentTranslation extends BaseTranslation
2531
*/
2632
private $departmentId;
2733

34+
/**
35+
* @return int
36+
*/
37+
public function getId(): int
38+
{
39+
return $this->id;
40+
}
41+
42+
/**
43+
* @param int $id
44+
* @return $this
45+
*/
46+
public function setId(int $id): self
47+
{
48+
$this->id = $id;
49+
50+
return $this;
51+
}
52+
2853
/**
2954
* @return string
3055
*/

src/Model/SelfService/ArticleTranslation.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77

88
class ArticleTranslation extends BaseTranslation
99
{
10+
/**
11+
* @var int
12+
* @SerializedName("id")
13+
*/
14+
private $id;
15+
1016
/**
1117
* @var string
1218
* @SerializedName("text")
@@ -55,6 +61,25 @@ class ArticleTranslation extends BaseTranslation
5561
*/
5662
private $slug;
5763

64+
/**
65+
* @return int
66+
*/
67+
public function getId(): int
68+
{
69+
return $this->id;
70+
}
71+
72+
/**
73+
* @param int $id
74+
* @return $this
75+
*/
76+
public function setId(int $id): self
77+
{
78+
$this->id = $id;
79+
80+
return $this;
81+
}
82+
5883
/**
5984
* @return string
6085
*/

src/Model/SelfService/CategoryTranslation.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77

88
class CategoryTranslation extends BaseTranslation
99
{
10+
/**
11+
* @var int
12+
* @SerializedName("id")
13+
*/
14+
private $id;
15+
1016
/**
1117
* @var string
1218
* @SerializedName("name")
@@ -25,6 +31,25 @@ class CategoryTranslation extends BaseTranslation
2531
*/
2632
private $slug;
2733

34+
/**
35+
* @return int
36+
*/
37+
public function getId(): int
38+
{
39+
return $this->id;
40+
}
41+
42+
/**
43+
* @param int $id
44+
* @return $this
45+
*/
46+
public function setId(int $id): self
47+
{
48+
$this->id = $id;
49+
50+
return $this;
51+
}
52+
2853
/**
2954
* @return string
3055
*/

src/Model/SelfService/TagTranslation.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77

88
class TagTranslation extends BaseTranslation
99
{
10+
/**
11+
* @var int
12+
* @SerializedName("id")
13+
*/
14+
private $id;
15+
1016
/**
1117
* @var string
1218
* @SerializedName("name")
@@ -25,6 +31,25 @@ class TagTranslation extends BaseTranslation
2531
*/
2632
private $tagId;
2733

34+
/**
35+
* @return int
36+
*/
37+
public function getId(): int
38+
{
39+
return $this->id;
40+
}
41+
42+
/**
43+
* @param int $id
44+
* @return $this
45+
*/
46+
public function setId(int $id): self
47+
{
48+
$this->id = $id;
49+
50+
return $this;
51+
}
52+
2853
/**
2954
* @return string
3055
*/

src/Model/SelfService/TypeTranslation.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77

88
class TypeTranslation extends BaseTranslation
99
{
10+
/**
11+
* @var int
12+
* @SerializedName("id")
13+
*/
14+
private $id;
15+
1016
/**
1117
* @var string
1218
* @SerializedName("name")
@@ -31,6 +37,25 @@ class TypeTranslation extends BaseTranslation
3137
*/
3238
private $slug;
3339

40+
/**
41+
* @return int
42+
*/
43+
public function getId(): int
44+
{
45+
return $this->id;
46+
}
47+
48+
/**
49+
* @param int $id
50+
* @return $this
51+
*/
52+
public function setId(int $id): self
53+
{
54+
$this->id = $id;
55+
56+
return $this;
57+
}
58+
3459
/**
3560
* @return string
3661
*/

src/Model/Shared/OptionTranslation.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77

88
class OptionTranslation extends BaseTranslation
99
{
10+
/**
11+
* @var int
12+
* @SerializedName("id")
13+
*/
14+
private $id;
15+
1016
/**
1117
* @deprecated This value is not set in all options and will be removed in later versions.
1218
* @var int|null
@@ -20,6 +26,25 @@ class OptionTranslation extends BaseTranslation
2026
*/
2127
private $value;
2228

29+
/**
30+
* @return int
31+
*/
32+
public function getId(): int
33+
{
34+
return $this->id;
35+
}
36+
37+
/**
38+
* @param int $id
39+
* @return $this
40+
*/
41+
public function setId(int $id): self
42+
{
43+
$this->id = $id;
44+
45+
return $this;
46+
}
47+
2348
/**
2449
* @deprecated
2550
* @return int|null

0 commit comments

Comments
 (0)