Skip to content

Commit

Permalink
Merge branch 'v5.23' into 'v5'
Browse files Browse the repository at this point in the history
Update to v5.23

See merge request transip/restapi-php-library!124
  • Loading branch information
Thies Verhave committed Jun 3, 2020
2 parents 77a2397 + 5333209 commit aee3a69
Show file tree
Hide file tree
Showing 10 changed files with 56 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Transip/ColocationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.22';
const API_VERSION = '5.23';
/** @var SoapClient The SoapClient used to perform the SOAP calls. */
protected static $_soapClient = null;

Expand Down
2 changes: 1 addition & 1 deletion Transip/DnsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.22';
const API_VERSION = '5.23';
/** @var SoapClient The SoapClient used to perform the SOAP calls. */
protected static $_soapClient = null;

Expand Down
6 changes: 4 additions & 2 deletions Transip/DomainService.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
require_once('WhoisContact.php');
require_once('DnsEntry.php');
require_once('DomainBranding.php');
require_once('ExtraContactField.php');
require_once('Tld.php');
require_once('DomainAction.php');

Expand All @@ -23,7 +24,7 @@ class Transip_DomainService
/** The SOAP service that corresponds with this class. */
const SERVICE = 'DomainService';
/** The API version. */
const API_VERSION = '5.22';
const API_VERSION = '5.23';
/** @var SoapClient The SoapClient used to perform the SOAP calls. */
protected static $_soapClient = null;

Expand Down Expand Up @@ -58,6 +59,7 @@ public static function _getSoapClient($parameters = array())
'WhoisContact' => 'Transip_WhoisContact',
'DnsEntry' => 'Transip_DnsEntry',
'DomainBranding' => 'Transip_DomainBranding',
'ExtraContactField' => 'Transip_ExtraContactField',
'Tld' => 'Transip_Tld',
'DomainAction' => 'Transip_DomainAction',
);
Expand Down Expand Up @@ -407,7 +409,7 @@ public static function register($domain)
* Registers a domain name, will automatically create and sign a proposition for it
*
* @param Transip_Domain $domain The Domain object holding information about the domain that needs to be registered.
* @param string[] $extraContactFields The ExtraContactFields that are required for this domain.
* @param Transip_ExtraContactField[] $extraContactFields The ExtraContactFields that are required for this domain.
* @requires readwrite mode
* @example examples/DomainService-DomainService-register-whois.php
* @return string proposition number
Expand Down
39 changes: 39 additions & 0 deletions Transip/ExtraContactField.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php

/**
* This class models a ExtraContactField
*
* @package Transip
* @class ExtraContactField
* @author TransIP ([email protected])
*/
class Transip_ExtraContactField
{
/**
* The name of the ExtraContactField
*
* @var string
*/
public $name = '';

/**
* The value of the ExtraContactField
*
* @var string
*/
public $value = '';

/**
* Constructs a new ExtraContactField
*
* @param string $name
* @param string $value
*/
public function __construct($name, $value)
{
$this->name = $name;
$this->value = $value;
}
}

?>
2 changes: 1 addition & 1 deletion Transip/ForwardService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.22';
const API_VERSION = '5.23';
/** @var SoapClient The SoapClient used to perform the SOAP calls. */
protected static $_soapClient = null;

Expand Down
2 changes: 1 addition & 1 deletion Transip/HaipService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.22';
const API_VERSION = '5.23';
/** @var SoapClient The SoapClient used to perform the SOAP calls. */
protected static $_soapClient = null;

Expand Down
2 changes: 1 addition & 1 deletion Transip/PropositionService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.22';
const API_VERSION = '5.23';
/** @var SoapClient The SoapClient used to perform the SOAP calls. */
protected static $_soapClient = null;

Expand Down
2 changes: 1 addition & 1 deletion Transip/VpsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.22';
const API_VERSION = '5.23';
/** @var SoapClient The SoapClient used to perform the SOAP calls. */
protected static $_soapClient = null;

Expand Down
2 changes: 1 addition & 1 deletion Transip/WebhostingService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.22';
const API_VERSION = '5.23';
/** @var SoapClient The SoapClient used to perform the SOAP calls. */
protected static $_soapClient = null;

Expand Down
8 changes: 6 additions & 2 deletions examples/DomainService-register-extraContactFields.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,13 @@
// To know if your domain needs extra contact fields see examples/DomainService-getExtraContactFields.php
// The format for the extra contact fields should be like:
// $extraContactFields = ['extraContactField' => 'value', ...];
$extraContactFields = [];

$propositionNumber = Transip_DomainService::register($domain, $extraContactFields);
$extraContactFieldName = 'EXAMPLE_NAME';
$extraContactFieldValue = 'example_value';
$extraContactField = new Transip_ExtraContactField($extraContactFieldName, $extraContactFieldValue);
$extraContactFields = [$extraContactField];

$propositionNumber = Transip_DomainService::registerWithExtraContactFields($domain, $extraContactFields);
echo 'The domain ' . $domain->name . ' has been requested with proposition number ' . $propositionNumber;
}
catch(SoapFault $e)
Expand Down

0 comments on commit aee3a69

Please sign in to comment.