Skip to content

Commit

Permalink
Merge branch 'restlessDomainHandover' into 'master'
Browse files Browse the repository at this point in the history
added domain handover

See merge request transip/restapi-php-library!185
  • Loading branch information
Jeroen Smit committed Apr 25, 2022
2 parents 9717d62 + d999bd4 commit 1ccc0ff
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
CHANGELOG
=========

6.22.0
-----
* Added domain handover
* Fixed incorrect type on MailList.setId

6.21.0
-----
* Added default domain contacts endpoint
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/Email/MailList.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function getId(): int
/**
* @param int $id
*/
public function setId(string $id): void
public function setId(int $id): void
{
$this->id = $id;
}
Expand Down
18 changes: 18 additions & 0 deletions src/Repository/DomainRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,24 @@ public function transfer(
$this->httpClient->post($this->getResourceUrl(), $parameters);
}

/**
* @param string $domainName
* @param string $targetCustomerName
* @return void
*/
public function handover(
string $domainName,
string $targetCustomerName
): void {
$parameters = [
'domainName' => $domainName,
'action' => 'handover',
'targetCustomerName' => $targetCustomerName,
];
$this->httpClient->patch($this->getResourceUrl(), $parameters);
}


public function update(Domain $domain): void
{
$this->httpClient->put($this->getResourceUrl($domain->getName()), ['domain' => $domain]);
Expand Down
2 changes: 1 addition & 1 deletion src/TransipAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
class TransipAPI
{
public const TRANSIP_API_ENDPOINT = "https://api.transip.nl/v6";
public const TRANSIP_API_LIBRARY_VERSION = "6.21.0";
public const TRANSIP_API_LIBRARY_VERSION = "6.22.0";
public const TRANSIP_API_DEMO_TOKEN = "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImN3MiFSbDU2eDNoUnkjelM4YmdOIn0.eyJpc3MiOiJhcGkudHJhbnNpcC5ubCIsImF1ZCI6ImFwaS50cmFuc2lwLm5sIiwianRpIjoiY3cyIVJsNTZ4M2hSeSN6UzhiZ04iLCJpYXQiOjE1ODIyMDE1NTAsIm5iZiI6MTU4MjIwMTU1MCwiZXhwIjoyMTE4NzQ1NTUwLCJjaWQiOiI2MDQ0OSIsInJvIjpmYWxzZSwiZ2siOmZhbHNlLCJrdiI6dHJ1ZX0.fYBWV4O5WPXxGuWG-vcrFWqmRHBm9yp0PHiYh_oAWxWxCaZX2Rf6WJfc13AxEeZ67-lY0TA2kSaOCp0PggBb_MGj73t4cH8gdwDJzANVxkiPL1Saqiw2NgZ3IHASJnisUWNnZp8HnrhLLe5ficvb1D9WOUOItmFC2ZgfGObNhlL2y-AMNLT4X7oNgrNTGm-mespo0jD_qH9dK5_evSzS3K8o03gu6p19jxfsnIh8TIVRvNdluYC2wo4qDl5EW5BEZ8OSuJ121ncOT1oRpzXB0cVZ9e5_UVAEr9X3f26_Eomg52-PjrgcRJ_jPIUYbrlo06KjjX2h0fzMr21ZE023Gw";

/**
Expand Down

0 comments on commit 1ccc0ff

Please sign in to comment.