Skip to content

Commit

Permalink
SupportPal v5 support (#175)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
bytestream authored Aug 23, 2023
1 parent ac0d7f5 commit 7a142d8
Show file tree
Hide file tree
Showing 36 changed files with 511 additions and 17 deletions.
45 changes: 35 additions & 10 deletions src/Model/Core/Brand.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ class Brand extends BaseModel
*/
private $favicon;

/**
* @var string|null
* @SerializedName("favicon_dark_mode")
*/
private $faviconDarkMode;

/**
* @var string|null
* @SerializedName("smtp_username")
Expand All @@ -59,7 +65,7 @@ class Brand extends BaseModel
private $defaultCountry;

/**
* @var int
* @var int|null
* @SerializedName("frontend_template_mode")
*/
private $frontendTemplateMode;
Expand Down Expand Up @@ -215,7 +221,7 @@ class Brand extends BaseModel
private $languageToggle;

/**
* @var int
* @var int|null
* @SerializedName("operator_template_mode")
*/
private $operatorTemplateMode;
Expand Down Expand Up @@ -301,6 +307,25 @@ public function setFavicon(?string $favicon): self
return $this;
}

/**
* @return string|null
*/
public function getFaviconDarkMode(): ?string
{
return $this->faviconDarkMode;
}

/**
* @param string|null $favicon
* @return self
*/
public function setFaviconDarkMode(?string $favicon): self
{
$this->faviconDarkMode = $favicon;

return $this;
}

/**
* @return string|null
*/
Expand Down Expand Up @@ -340,18 +365,18 @@ public function setDefaultCountry(string $defaultCountry): self
}

/**
* @return int
* @return int|null
*/
public function getFrontendTemplateMode(): int
public function getFrontendTemplateMode(): ?int
{
return $this->frontendTemplateMode;
}

/**
* @param int $frontendTemplateMode
* @param int|null $frontendTemplateMode
* @return self
*/
public function setFrontendTemplateMode(int $frontendTemplateMode): self
public function setFrontendTemplateMode(?int $frontendTemplateMode): self
{
$this->frontendTemplateMode = $frontendTemplateMode;

Expand Down Expand Up @@ -815,18 +840,18 @@ public function setLanguageToggle(int $languageToggle): self
}

/**
* @return int
* @return int|null
*/
public function getOperatorTemplateMode(): int
public function getOperatorTemplateMode(): ?int
{
return $this->operatorTemplateMode;
}

/**
* @param int $operatorTemplateMode
* @param int|null $operatorTemplateMode
* @return self
*/
public function setOperatorTemplateMode(int $operatorTemplateMode): self
public function setOperatorTemplateMode(?int $operatorTemplateMode): self
{
$this->operatorTemplateMode = $operatorTemplateMode;

Expand Down
25 changes: 25 additions & 0 deletions src/Model/Core/BrandTranslation.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@

class BrandTranslation extends BaseTranslation
{
/**
* @var int
* @SerializedName("id")
*/
private $id;

/**
* @var string
* @SerializedName("name")
Expand All @@ -19,6 +25,25 @@ class BrandTranslation extends BaseTranslation
*/
private $brandId;

/**
* @return int
*/
public function getId(): int
{
return $this->id;
}

/**
* @param int $id
* @return $this
*/
public function setId(int $id): self
{
$this->id = $id;

return $this;
}

/**
* @return string
*/
Expand Down
25 changes: 25 additions & 0 deletions src/Model/Department/DepartmentTranslation.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@

class DepartmentTranslation extends BaseTranslation
{
/**
* @var int
* @SerializedName("id")
*/
private $id;

/**
* @var string
* @SerializedName("name")
Expand All @@ -25,6 +31,25 @@ class DepartmentTranslation extends BaseTranslation
*/
private $departmentId;

/**
* @return int
*/
public function getId(): int
{
return $this->id;
}

/**
* @param int $id
* @return $this
*/
public function setId(int $id): self
{
$this->id = $id;

return $this;
}

/**
* @return string
*/
Expand Down
25 changes: 25 additions & 0 deletions src/Model/SelfService/ArticleTranslation.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@

class ArticleTranslation extends BaseTranslation
{
/**
* @var int
* @SerializedName("id")
*/
private $id;

/**
* @var string
* @SerializedName("text")
Expand Down Expand Up @@ -55,6 +61,25 @@ class ArticleTranslation extends BaseTranslation
*/
private $slug;

/**
* @return int
*/
public function getId(): int
{
return $this->id;
}

/**
* @param int $id
* @return $this
*/
public function setId(int $id): self
{
$this->id = $id;

return $this;
}

/**
* @return string
*/
Expand Down
25 changes: 25 additions & 0 deletions src/Model/SelfService/CategoryTranslation.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@

class CategoryTranslation extends BaseTranslation
{
/**
* @var int
* @SerializedName("id")
*/
private $id;

/**
* @var string
* @SerializedName("name")
Expand All @@ -25,6 +31,25 @@ class CategoryTranslation extends BaseTranslation
*/
private $slug;

/**
* @return int
*/
public function getId(): int
{
return $this->id;
}

/**
* @param int $id
* @return $this
*/
public function setId(int $id): self
{
$this->id = $id;

return $this;
}

/**
* @return string
*/
Expand Down
25 changes: 25 additions & 0 deletions src/Model/SelfService/TagTranslation.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@

class TagTranslation extends BaseTranslation
{
/**
* @var int
* @SerializedName("id")
*/
private $id;

/**
* @var string
* @SerializedName("name")
Expand All @@ -25,6 +31,25 @@ class TagTranslation extends BaseTranslation
*/
private $tagId;

/**
* @return int
*/
public function getId(): int
{
return $this->id;
}

/**
* @param int $id
* @return $this
*/
public function setId(int $id): self
{
$this->id = $id;

return $this;
}

/**
* @return string
*/
Expand Down
25 changes: 25 additions & 0 deletions src/Model/SelfService/TypeTranslation.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@

class TypeTranslation extends BaseTranslation
{
/**
* @var int
* @SerializedName("id")
*/
private $id;

/**
* @var string
* @SerializedName("name")
Expand All @@ -31,6 +37,25 @@ class TypeTranslation extends BaseTranslation
*/
private $slug;

/**
* @return int
*/
public function getId(): int
{
return $this->id;
}

/**
* @param int $id
* @return $this
*/
public function setId(int $id): self
{
$this->id = $id;

return $this;
}

/**
* @return string
*/
Expand Down
25 changes: 25 additions & 0 deletions src/Model/Shared/OptionTranslation.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@

class OptionTranslation extends BaseTranslation
{
/**
* @var int
* @SerializedName("id")
*/
private $id;

/**
* @deprecated This value is not set in all options and will be removed in later versions.
* @var int|null
Expand All @@ -20,6 +26,25 @@ class OptionTranslation extends BaseTranslation
*/
private $value;

/**
* @return int
*/
public function getId(): int
{
return $this->id;
}

/**
* @param int $id
* @return $this
*/
public function setId(int $id): self
{
$this->id = $id;

return $this;
}

/**
* @deprecated
* @return int|null
Expand Down
Loading

0 comments on commit 7a142d8

Please sign in to comment.