Add More Properties To Custom Hostname Updating

These are documented but not provided by the SDK
This commit is contained in:
Phil Young
2021-06-15 11:10:23 +01:00
parent 135b9a6813
commit da3d10c4ee
2 changed files with 79 additions and 3 deletions

View File

@@ -129,7 +129,7 @@ class CustomHostnames implements API
* @param string $customOriginServer
* @return \stdClass
*/
public function updateHostname(string $zoneID, string $hostnameID, string $sslMethod = '', string $sslType = '', array $sslSettings = [], string $customOriginServer = ''): \stdClass
public function updateHostname(string $zoneID, string $hostnameID, string $sslMethod = '', string $sslType = '', array $sslSettings = [], string $customOriginServer = '', ?bool $wildcard = null, string $bundleMethod = '', string $customKey = '', string $customCertificate = ''): \stdClass
{
$query = [];
@@ -145,6 +145,22 @@ class CustomHostnames implements API
$query['settings'] = $sslSettings;
}
if (is_null($wildcard) === false) {
$query['wildcard'] = $wildcard;
}
if (empty($bundleMethod) === false) {
$query['bundle_method'] = $bundleMethod;
}
if (empty($customKey) === false) {
$query['custom_key'] = $customKey;
}
if (empty($customCertificate) === false) {
$query['custom_certificate'] = $customCertificate;
}
if (!empty($query)) {
$options = [
'ssl' => $query