Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Dnsimple/Struct/Domain.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ class Domain
*/
public $privateWhois;
/**
* @var bool True if the domain Trustee service is enabled, false otherwise
* @var bool True if the domain trustee is enabled, false otherwise
*/
public $trusteeService;
public $trustee;
/**
* @var string|null The timestamp when domain will expire
*/
Expand All @@ -70,7 +70,7 @@ public function __construct($data)
$this->state = $data->state;
$this->autoRenew = $data->auto_renew;
$this->privateWhois = $data->private_whois;
$this->trusteeService = $data->trustee_service;
$this->trustee = $data->trustee;
$this->expiresAt = $data->expires_at;
$this->createdAt = $data->created_at;
$this->updatedAt = $data->updated_at;
Expand Down
6 changes: 3 additions & 3 deletions src/Dnsimple/Struct/DomainPrice.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ class DomainPrice
*/
public $transferPrice;
/**
* @var float The trustee service price
* @var float The trustee price
*/
public $trusteeServicePrice;
public $trusteePrice;

public function __construct($data)
{
Expand All @@ -41,6 +41,6 @@ public function __construct($data)
$this->registrationPrice = $data->registration_price;
$this->renewalPrice = $data->renewal_price;
$this->transferPrice = $data->transfer_price;
$this->trusteeServicePrice = $data->trustee_service_price;
$this->trusteePrice = $data->trustee_price;
}
}
6 changes: 3 additions & 3 deletions src/Dnsimple/Struct/DomainRegistration.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ class DomainRegistration
*/
public $whoisPrivacy;
/**
* @var bool True if the domain Trustee service was requested
* @var bool True if trustee was requested
*/
public $trusteeService;
public $trustee;
/**
* @var string When the domain renewal was created in DNSimple
*/
Expand All @@ -59,7 +59,7 @@ public function __construct($data)
$this->state = $data->state;
$this->autoRenew = $data->auto_renew;
$this->whoisPrivacy = $data->whois_privacy;
$this->trusteeService = $data->trustee_service;
$this->trustee = $data->trustee;
$this->createdAt = $data->created_at;
$this->updatedAt = $data->updated_at;
}
Expand Down
6 changes: 3 additions & 3 deletions src/Dnsimple/Struct/DomainTransfer.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ class DomainTransfer
*/
public $whoisPrivacy;
/**
* @var bool True if the domain Trustee service was requested
* @var bool True if trustee was requested
*/
public $trusteeService;
public $trustee;

public $statusDescription;
/**
Expand All @@ -56,7 +56,7 @@ public function __construct($data)
$this->state = $data->state;
$this->autoRenew = $data->auto_renew;
$this->whoisPrivacy = $data->whois_privacy;
$this->trusteeService = $data->trustee_service;
$this->trustee = $data->trustee;
if (property_exists($data, 'status_description'))
$this->statusDescription = $data->status_description;
$this->createdAt = $data->created_at;
Expand Down
2 changes: 1 addition & 1 deletion tests/Dnsimple/Service/DomainsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function testGetDomain()
self::assertEquals(181984, $data->id);
self::assertEquals(1385, $data->accountId);
self::assertEquals(2715, $data->registrantId);
self::assertFalse($data->trusteeService);
self::assertFalse($data->trustee);
self::assertEquals("2021-06-05T02:15:00Z", $data->expiresAt);
}

Expand Down
12 changes: 6 additions & 6 deletions tests/Dnsimple/Service/RegistrarTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function testGetDomainPrices()
self::assertEquals(20.0, $prices->registrationPrice);
self::assertEquals(20.0, $prices->renewalPrice);
self::assertEquals(20.0, $prices->transferPrice);
self::assertEquals(20.0, $prices->trusteeServicePrice);
self::assertEquals(20.0, $prices->trusteePrice);
}

public function testGetDomainPricesFailure()
Expand Down Expand Up @@ -67,7 +67,7 @@ public function testRegisterDomain()
self::assertEquals("new", $registration->state);
self::assertFalse($registration->autoRenew);
self::assertFalse($registration->whoisPrivacy);
self::assertFalse($registration->trusteeService);
self::assertFalse($registration->trustee);
self::assertEquals("2016-12-09T19:35:31Z", $registration->createdAt);
self::assertEquals("2016-12-09T19:35:31Z", $registration->updatedAt);
}
Expand All @@ -84,7 +84,7 @@ public function testGetDomainRegistration()
self::assertEquals("registering", $registration->state);
self::assertFalse($registration->autoRenew);
self::assertFalse($registration->whoisPrivacy);
self::assertFalse($registration->trusteeService);
self::assertFalse($registration->trustee);
self::assertEquals("2023-01-27T17:44:32Z", $registration->createdAt);
self::assertEquals("2023-01-27T17:44:40Z", $registration->updatedAt);
}
Expand All @@ -105,7 +105,7 @@ public function testTransferDomain()
self::assertEquals("transferring", $domainTransfer->state);
self::assertFalse($domainTransfer->autoRenew);
self::assertFalse($domainTransfer->whoisPrivacy);
self::assertFalse($domainTransfer->trusteeService);
self::assertFalse($domainTransfer->trustee);
self::assertEquals("2016-12-09T19:43:41Z", $domainTransfer->createdAt);
self::assertEquals("2016-12-09T19:43:43Z", $domainTransfer->updatedAt);
}
Expand Down Expand Up @@ -147,7 +147,7 @@ public function testGetDomainTransfer()
self::assertEquals("cancelled", $transfer->state);
self::assertFalse($transfer->autoRenew);
self::assertFalse($transfer->whoisPrivacy);
self::assertFalse($transfer->trusteeService);
self::assertFalse($transfer->trustee);
self::assertEquals("Canceled by customer", $transfer->statusDescription);
self::assertEquals( "2020-06-05T18:08:00Z", $transfer->createdAt);
self::assertEquals("2020-06-05T18:10:01Z", $transfer->updatedAt);
Expand All @@ -164,7 +164,7 @@ public function testCancelDomainTransfer()
self::assertEquals(202, $response->getStatusCode());
self::assertInstanceOf(DomainTransfer::class, $cancellation);
self::assertEquals("transferring", $cancellation->state);
self::assertFalse($cancellation->trusteeService);
self::assertFalse($cancellation->trustee);
}

public function testRenewDomain()
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/v2/api/cancelDomainTransfer/success.http
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ x-xss-protection: 1; mode=block
x-download-options: noopen
x-permitted-cross-domain-policies: none

{"data":{"id":361,"domain_id":182245,"registrant_id":2715,"state":"transferring","auto_renew":false,"whois_privacy":false,"trustee_service":false,"status_description":null,"created_at":"2020-06-05T18:08:00Z","updated_at":"2020-06-05T18:08:04Z"}}
{"data":{"id":361,"domain_id":182245,"registrant_id":2715,"state":"transferring","auto_renew":false,"whois_privacy":false,"trustee":false,"status_description":null,"created_at":"2020-06-05T18:08:00Z","updated_at":"2020-06-05T18:08:04Z"}}
2 changes: 1 addition & 1 deletion tests/fixtures/v2/api/getDomain/success.http
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ x-download-options: noopen
x-permitted-cross-domain-policies: none
strict-transport-security: max-age=31536000

{"data":{"id":181984,"account_id":1385,"registrant_id":2715,"name":"example-alpha.com","unicode_name":"example-alpha.com","state":"registered","auto_renew":false,"private_whois":false,"trustee_service":false,"expires_on":"2021-06-05","expires_at":"2021-06-05T02:15:00Z","created_at":"2020-06-04T19:15:14Z","updated_at":"2020-06-04T19:15:21Z"}}
{"data":{"id":181984,"account_id":1385,"registrant_id":2715,"name":"example-alpha.com","unicode_name":"example-alpha.com","state":"registered","auto_renew":false,"private_whois":false,"trustee":false,"expires_on":"2021-06-05","expires_at":"2021-06-05T02:15:00Z","created_at":"2020-06-04T19:15:14Z","updated_at":"2020-06-04T19:15:21Z"}}
2 changes: 1 addition & 1 deletion tests/fixtures/v2/api/getDomainPrices/success.http
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ x-permitted-cross-domain-policies: none
content-security-policy: frame-ancestors 'none'
strict-transport-security: max-age=31536000

{"data":{"domain":"bingo.pizza","premium":true,"registration_price":20.0,"renewal_price":20.0,"transfer_price":20.0,"restore_price":20.0,"trustee_service_price":20.0}}
{"data":{"domain":"bingo.pizza","premium":true,"registration_price":20.0,"renewal_price":20.0,"transfer_price":20.0,"restore_price":20.0,"trustee_price":20.0}}
2 changes: 1 addition & 1 deletion tests/fixtures/v2/api/getDomainRegistration/success.http
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ x-download-options: noopen
x-permitted-cross-domain-policies: none
strict-transport-security: max-age=31536000

{"data":{"id":361,"domain_id":104040,"registrant_id":2715,"period":1,"state":"registering","auto_renew":false,"whois_privacy":false,"trustee_service":false,"created_at":"2023-01-27T17:44:32Z","updated_at":"2023-01-27T17:44:40Z"}}
{"data":{"id":361,"domain_id":104040,"registrant_id":2715,"period":1,"state":"registering","auto_renew":false,"whois_privacy":false,"trustee":false,"created_at":"2023-01-27T17:44:32Z","updated_at":"2023-01-27T17:44:40Z"}}
2 changes: 1 addition & 1 deletion tests/fixtures/v2/api/getDomainTransfer/success.http
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ x-download-options: noopen
x-permitted-cross-domain-policies: none
strict-transport-security: max-age=31536000

{"data":{"id":361,"domain_id":182245,"registrant_id":2715,"state":"cancelled","auto_renew":false,"whois_privacy":false,"trustee_service":false,"status_description":"Canceled by customer","created_at":"2020-06-05T18:08:00Z","updated_at":"2020-06-05T18:10:01Z"}}
{"data":{"id":361,"domain_id":182245,"registrant_id":2715,"state":"cancelled","auto_renew":false,"whois_privacy":false,"trustee":false,"status_description":"Canceled by customer","created_at":"2020-06-05T18:08:00Z","updated_at":"2020-06-05T18:10:01Z"}}
2 changes: 1 addition & 1 deletion tests/fixtures/v2/api/listCharges/success.http
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ cache-control: no-store, must-revalidate, private, max-age=0
x-request-id: a57a87c8-626a-4361-9fb8-b55ca9be8e5d
x-runtime: 0.060526

{"data":[{"invoiced_at":"2023-08-17T05:53:36Z","total_amount":"14.50","balance_amount":"0.00","reference":"1-2","state":"collected","items":[{"description":"Register bubble-registered.com","amount":"14.50","product_id":1,"product_type":"domain-registration","product_reference":"bubble-registered.com"}]},{"invoiced_at":"2023-08-17T05:57:53Z","total_amount":"14.50","balance_amount":"0.00","reference":"2-2","state":"refunded","items":[{"description":"Register example.com","amount":"14.50","product_id":2,"product_type":"domain-registration","product_reference":"example.com"}]},{"invoiced_at":"2023-10-24T07:49:05Z","total_amount":"1099999.99","balance_amount":"0.00","reference":"4-2","state":"collected","items":[{"description":"Test Line Item 1","amount":"99999.99","product_id":null,"product_type":"manual","product_reference":null},{"description":"Test Line Item 2","amount":"1000000.00","product_id":null,"product_type":"manual","product_reference":null}]},{"invoiced_at":"2023-10-24T09:00:00Z","total_amount":"20.00","balance_amount":"0.00","reference":"5-2","state":"collected","items":[{"description":"Purchase Certificate www.bubble-registered.com","amount":"20.00","product_id":42,"product_type":"certificate-purchase","product_reference":"42"}]}],"pagination":{"current_page":1,"per_page":30,"total_entries":4,"total_pages":1}}
{"data":[{"invoiced_at":"2023-08-17T05:53:36Z","total_amount":"14.50","balance_amount":"0.00","reference":"1-2","state":"collected","items":[{"description":"Register bubble-registered.com","amount":"14.50","product_id":1,"product_type":"domain-registration","product_reference":"bubble-registered.com"}]},{"invoiced_at":"2023-08-17T05:57:53Z","total_amount":"14.50","balance_amount":"0.00","reference":"2-2","state":"refunded","items":[{"description":"Register example.com","amount":"14.50","product_id":2,"product_type":"domain-registration","product_reference":"example.com"}]},{"invoiced_at":"2023-10-24T07:49:05Z","total_amount":"1099999.99","balance_amount":"0.00","reference":"4-2","state":"collected","items":[{"description":"Test Line Item 1","amount":"99999.99","product_id":null,"product_type":"manual","product_reference":null},{"description":"Test Line Item 2","amount":"1000000.00","product_id":null,"product_type":"manual","product_reference":null}]},{"invoiced_at":"2023-10-24T09:00:00Z","total_amount":"20.00","balance_amount":"0.00","reference":"5-2","state":"collected","items":[{"description":"Purchase Certificate www.bubble-registered.com","amount":"20.00","product_id":42,"product_type":"certificate-purchase","product_reference":"42"}]}],"pagination":{"current_page":1,"per_page":30,"total_entries":4,"total_pages":1}}
2 changes: 1 addition & 1 deletion tests/fixtures/v2/api/registerDomain/success.http
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ x-permitted-cross-domain-policies: none
x-xss-protection: 1; mode=block
strict-transport-security: max-age=31536000

{"data":{"id":1,"domain_id":999,"registrant_id":2,"period":1,"state":"new","auto_renew":false,"whois_privacy":false,"trustee_service":false,"created_at":"2016-12-09T19:35:31Z","updated_at":"2016-12-09T19:35:31Z"}}
{"data":{"id":1,"domain_id":999,"registrant_id":2,"period":1,"state":"new","auto_renew":false,"whois_privacy":false,"trustee":false,"created_at":"2016-12-09T19:35:31Z","updated_at":"2016-12-09T19:35:31Z"}}
2 changes: 1 addition & 1 deletion tests/fixtures/v2/api/transferDomain/success.http
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ x-permitted-cross-domain-policies: none
x-xss-protection: 1; mode=block
strict-transport-security: max-age=31536000

{"data":{"id":1,"domain_id":999,"registrant_id":2,"state":"transferring","auto_renew":false,"whois_privacy":false,"trustee_service":false,"created_at":"2016-12-09T19:43:41Z","updated_at":"2016-12-09T19:43:43Z"}}
{"data":{"id":1,"domain_id":999,"registrant_id":2,"state":"transferring","auto_renew":false,"whois_privacy":false,"trustee":false,"created_at":"2016-12-09T19:43:41Z","updated_at":"2016-12-09T19:43:43Z"}}