From b049282c843654a987fa12f0a32a2923c0c64cad Mon Sep 17 00:00:00 2001 From: Pierre van Horick Date: Mon, 30 Sep 2019 11:56:34 +0200 Subject: [PATCH 1/3] Update to 5.17 --- CHANGELOG | 4 +++ Transip/ColocationService.php | 2 +- Transip/DnsService.php | 2 +- Transip/DomainService.php | 48 +++++++++++++++++++++++++++++++++- Transip/ForwardService.php | 2 +- Transip/HaipService.php | 2 +- Transip/PropositionService.php | 2 +- Transip/VpsService.php | 2 +- Transip/WebhostingService.php | 2 +- 9 files changed, 58 insertions(+), 8 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index bf95ae9..9bf3208 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +TRANSIP API V5.17 +NEW +- Added functionality to get default DNS Entries and Nameservers by domain name. + TRANSIP API V5.16 NEW - Added SSHFP, TLSA, and CAA to DnsEntry as acceptable types. diff --git a/Transip/ColocationService.php b/Transip/ColocationService.php index fda0580..655fdd6 100644 --- a/Transip/ColocationService.php +++ b/Transip/ColocationService.php @@ -16,7 +16,7 @@ class Transip_ColocationService /** The SOAP service that corresponds with this class. */ const SERVICE = 'ColocationService'; /** The API version. */ - const API_VERSION = '5.16'; + const API_VERSION = '5.17'; /** @var SoapClient The SoapClient used to perform the SOAP calls. */ protected static $_soapClient = null; diff --git a/Transip/DnsService.php b/Transip/DnsService.php index 854ef20..5511a1a 100644 --- a/Transip/DnsService.php +++ b/Transip/DnsService.php @@ -17,7 +17,7 @@ class Transip_DnsService /** The SOAP service that corresponds with this class. */ const SERVICE = 'DnsService'; /** The API version. */ - const API_VERSION = '5.16'; + const API_VERSION = '5.17'; /** @var SoapClient The SoapClient used to perform the SOAP calls. */ protected static $_soapClient = null; diff --git a/Transip/DomainService.php b/Transip/DomainService.php index 1e91677..4e85011 100644 --- a/Transip/DomainService.php +++ b/Transip/DomainService.php @@ -23,7 +23,7 @@ class Transip_DomainService /** The SOAP service that corresponds with this class. */ const SERVICE = 'DomainService'; /** The API version. */ - const API_VERSION = '5.16'; + const API_VERSION = '5.17'; /** @var SoapClient The SoapClient used to perform the SOAP calls. */ protected static $_soapClient = null; @@ -549,6 +549,52 @@ public static function handoverWithAuthCode($domainName, $authCode) { return self::_getSoapClient(array_merge(array($domainName, $authCode), array('__method' => 'handoverWithAuthCode')))->handoverWithAuthCode($domainName, $authCode); } + + /** + * Get Default DNS Entries for a customer. + * + * @return array + * @throws ApiException + */ + public static function getDefaultDnsEntriesByCustomerId() + { + return self::_getSoapClient(array_merge(array(), array('__method' => 'getDefaultDnsEntriesByCustomerId')))->getDefaultDnsEntriesByCustomerId(); + } + + /** + * + * + * @param string $domainName + * @return array + * @throws ApiException + */ + public static function getDefaultDnsEntriesByDomainName($domainName) + { + return self::_getSoapClient(array_merge(array($domainName), array('__method' => 'getDefaultDnsEntriesByDomainName')))->getDefaultDnsEntriesByDomainName($domainName); + } + + /** + * + * + * @return array + * @throws ApiException + */ + public static function getDefaultNameserversByCustomerId() + { + return self::_getSoapClient(array_merge(array(), array('__method' => 'getDefaultNameserversByCustomerId')))->getDefaultNameserversByCustomerId(); + } + + /** + * + * + * @param string $domainName + * @return array + * @throws ApiException + */ + public static function getDefaultNameserversByDomainName($domainName) + { + return self::_getSoapClient(array_merge(array($domainName), array('__method' => 'getDefaultNameserversByDomainName')))->getDefaultNameserversByDomainName($domainName); + } } ?> diff --git a/Transip/ForwardService.php b/Transip/ForwardService.php index 8773e31..3c0179d 100644 --- a/Transip/ForwardService.php +++ b/Transip/ForwardService.php @@ -16,7 +16,7 @@ class Transip_ForwardService /** The SOAP service that corresponds with this class. */ const SERVICE = 'ForwardService'; /** The API version. */ - const API_VERSION = '5.16'; + const API_VERSION = '5.17'; /** @var SoapClient The SoapClient used to perform the SOAP calls. */ protected static $_soapClient = null; diff --git a/Transip/HaipService.php b/Transip/HaipService.php index 38ca24d..6505698 100644 --- a/Transip/HaipService.php +++ b/Transip/HaipService.php @@ -17,7 +17,7 @@ class Transip_HaipService /** The SOAP service that corresponds with this class. */ const SERVICE = 'HaipService'; /** The API version. */ - const API_VERSION = '5.16'; + const API_VERSION = '5.17'; /** @var SoapClient The SoapClient used to perform the SOAP calls. */ protected static $_soapClient = null; diff --git a/Transip/PropositionService.php b/Transip/PropositionService.php index e164e56..6a4647c 100644 --- a/Transip/PropositionService.php +++ b/Transip/PropositionService.php @@ -15,7 +15,7 @@ class Transip_PropositionService /** The SOAP service that corresponds with this class. */ const SERVICE = 'PropositionService'; /** The API version. */ - const API_VERSION = '5.16'; + const API_VERSION = '5.17'; /** @var SoapClient The SoapClient used to perform the SOAP calls. */ protected static $_soapClient = null; diff --git a/Transip/VpsService.php b/Transip/VpsService.php index 1c373b8..da5d227 100644 --- a/Transip/VpsService.php +++ b/Transip/VpsService.php @@ -22,7 +22,7 @@ class Transip_VpsService /** The SOAP service that corresponds with this class. */ const SERVICE = 'VpsService'; /** The API version. */ - const API_VERSION = '5.16'; + const API_VERSION = '5.17'; /** @var SoapClient The SoapClient used to perform the SOAP calls. */ protected static $_soapClient = null; diff --git a/Transip/WebhostingService.php b/Transip/WebhostingService.php index 99cb925..95a7f7d 100644 --- a/Transip/WebhostingService.php +++ b/Transip/WebhostingService.php @@ -22,7 +22,7 @@ class Transip_WebhostingService /** The SOAP service that corresponds with this class. */ const SERVICE = 'WebhostingService'; /** The API version. */ - const API_VERSION = '5.16'; + const API_VERSION = '5.17'; /** @var SoapClient The SoapClient used to perform the SOAP calls. */ protected static $_soapClient = null; From dd5b812e6440e440dc358b9c6ed22aef2ba5affe Mon Sep 17 00:00:00 2001 From: Pierre van Horick Date: Mon, 30 Sep 2019 14:25:38 +0200 Subject: [PATCH 2/3] Rename Functions --- Transip/DomainService.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Transip/DomainService.php b/Transip/DomainService.php index 4e85011..9de8332 100644 --- a/Transip/DomainService.php +++ b/Transip/DomainService.php @@ -556,9 +556,9 @@ public static function handoverWithAuthCode($domainName, $authCode) * @return array * @throws ApiException */ - public static function getDefaultDnsEntriesByCustomerId() + public static function getDefaultDnsEntries() { - return self::_getSoapClient(array_merge(array(), array('__method' => 'getDefaultDnsEntriesByCustomerId')))->getDefaultDnsEntriesByCustomerId(); + return self::_getSoapClient(array_merge(array(), array('__method' => 'getDefaultDnsEntries')))->getDefaultDnsEntries(); } /** @@ -579,9 +579,9 @@ public static function getDefaultDnsEntriesByDomainName($domainName) * @return array * @throws ApiException */ - public static function getDefaultNameserversByCustomerId() + public static function getDefaultNameservers() { - return self::_getSoapClient(array_merge(array(), array('__method' => 'getDefaultNameserversByCustomerId')))->getDefaultNameserversByCustomerId(); + return self::_getSoapClient(array_merge(array(), array('__method' => 'getDefaultNameservers')))->getDefaultNameservers(); } /** From 6ca4bed35f2b20de24d0748e523ca24973806b15 Mon Sep 17 00:00:00 2001 From: Pierre van Horick Date: Tue, 1 Oct 2019 10:31:49 +0200 Subject: [PATCH 3/3] Added descriptions, return types --- Transip/DomainService.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Transip/DomainService.php b/Transip/DomainService.php index 9de8332..1a435d7 100644 --- a/Transip/DomainService.php +++ b/Transip/DomainService.php @@ -553,8 +553,8 @@ public static function handoverWithAuthCode($domainName, $authCode) /** * Get Default DNS Entries for a customer. * - * @return array - * @throws ApiException + * @return Transip_DnsEntry[] A list of the default Dns Entries for the currently authenticated user + * @throws ApiException If there are not default values */ public static function getDefaultDnsEntries() { @@ -562,11 +562,11 @@ public static function getDefaultDnsEntries() } /** - * + * Get Default DNS Entries for a specific domain * - * @param string $domainName - * @return array - * @throws ApiException + * @param string $domainName The domainName to get the information for.

- domainName must meet the requirements for a domain name described in: RFC 952 + * @return Transip_DnsEntry[] A list of the default DNS entries for this domain + * @throws ApiException If the domain could not be found. */ public static function getDefaultDnsEntriesByDomainName($domainName) { @@ -574,9 +574,9 @@ public static function getDefaultDnsEntriesByDomainName($domainName) } /** - * + * Get Default Nameservers for a customer * - * @return array + * @return Transip_Nameserver[] A list of Nameservers for the currently authenticated API User * @throws ApiException */ public static function getDefaultNameservers() @@ -585,11 +585,11 @@ public static function getDefaultNameservers() } /** - * + * Get the Default nameservers for the given domain. * - * @param string $domainName - * @return array - * @throws ApiException + * @param string $domainName The domainName to get the information for.

- domainName must meet the requirements for a domain name described in: RFC 952 + * @return Transip_Nameserver[] A list of the default Nameservers for this domain + * @throws ApiException If the domain could not be found */ public static function getDefaultNameserversByDomainName($domainName) {