diff --git a/src/Dnsimple/Struct/Domain.php b/src/Dnsimple/Struct/Domain.php index 9ab39df..8ffe556 100644 --- a/src/Dnsimple/Struct/Domain.php +++ b/src/Dnsimple/Struct/Domain.php @@ -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 */ @@ -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; diff --git a/src/Dnsimple/Struct/DomainPrice.php b/src/Dnsimple/Struct/DomainPrice.php index 8068f19..d2e1904 100644 --- a/src/Dnsimple/Struct/DomainPrice.php +++ b/src/Dnsimple/Struct/DomainPrice.php @@ -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) { @@ -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; } } diff --git a/src/Dnsimple/Struct/DomainRegistration.php b/src/Dnsimple/Struct/DomainRegistration.php index b664581..a7d3706 100644 --- a/src/Dnsimple/Struct/DomainRegistration.php +++ b/src/Dnsimple/Struct/DomainRegistration.php @@ -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 */ @@ -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; } diff --git a/src/Dnsimple/Struct/DomainTransfer.php b/src/Dnsimple/Struct/DomainTransfer.php index 5e359dc..662bd26 100644 --- a/src/Dnsimple/Struct/DomainTransfer.php +++ b/src/Dnsimple/Struct/DomainTransfer.php @@ -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; /** @@ -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; diff --git a/tests/Dnsimple/Service/DomainsTest.php b/tests/Dnsimple/Service/DomainsTest.php index 8ecbd49..cec7878 100644 --- a/tests/Dnsimple/Service/DomainsTest.php +++ b/tests/Dnsimple/Service/DomainsTest.php @@ -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); } diff --git a/tests/Dnsimple/Service/RegistrarTest.php b/tests/Dnsimple/Service/RegistrarTest.php index 8cad2fd..71cc667 100644 --- a/tests/Dnsimple/Service/RegistrarTest.php +++ b/tests/Dnsimple/Service/RegistrarTest.php @@ -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() @@ -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); } @@ -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); } @@ -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); } @@ -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); @@ -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() diff --git a/tests/fixtures/v2/api/cancelDomainTransfer/success.http b/tests/fixtures/v2/api/cancelDomainTransfer/success.http index 72e58a0..80d1b02 100644 --- a/tests/fixtures/v2/api/cancelDomainTransfer/success.http +++ b/tests/fixtures/v2/api/cancelDomainTransfer/success.http @@ -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"}} diff --git a/tests/fixtures/v2/api/getDomain/success.http b/tests/fixtures/v2/api/getDomain/success.http index 6b86fa8..227eef6 100644 --- a/tests/fixtures/v2/api/getDomain/success.http +++ b/tests/fixtures/v2/api/getDomain/success.http @@ -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"}} diff --git a/tests/fixtures/v2/api/getDomainPrices/success.http b/tests/fixtures/v2/api/getDomainPrices/success.http index 66b0e5c..fcbbbd5 100644 --- a/tests/fixtures/v2/api/getDomainPrices/success.http +++ b/tests/fixtures/v2/api/getDomainPrices/success.http @@ -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}} diff --git a/tests/fixtures/v2/api/getDomainRegistration/success.http b/tests/fixtures/v2/api/getDomainRegistration/success.http index 5cfd190..32379b2 100644 --- a/tests/fixtures/v2/api/getDomainRegistration/success.http +++ b/tests/fixtures/v2/api/getDomainRegistration/success.http @@ -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"}} diff --git a/tests/fixtures/v2/api/getDomainTransfer/success.http b/tests/fixtures/v2/api/getDomainTransfer/success.http index 44fe7d9..795d85d 100644 --- a/tests/fixtures/v2/api/getDomainTransfer/success.http +++ b/tests/fixtures/v2/api/getDomainTransfer/success.http @@ -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"}} diff --git a/tests/fixtures/v2/api/listCharges/success.http b/tests/fixtures/v2/api/listCharges/success.http index 851d232..fd62b0f 100644 --- a/tests/fixtures/v2/api/listCharges/success.http +++ b/tests/fixtures/v2/api/listCharges/success.http @@ -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}} \ No newline at end of file diff --git a/tests/fixtures/v2/api/registerDomain/success.http b/tests/fixtures/v2/api/registerDomain/success.http index a991ed0..c682d7e 100644 --- a/tests/fixtures/v2/api/registerDomain/success.http +++ b/tests/fixtures/v2/api/registerDomain/success.http @@ -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"}} diff --git a/tests/fixtures/v2/api/transferDomain/success.http b/tests/fixtures/v2/api/transferDomain/success.http index 52b2dce..8ae6d21 100644 --- a/tests/fixtures/v2/api/transferDomain/success.http +++ b/tests/fixtures/v2/api/transferDomain/success.http @@ -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"}}