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
4 changes: 2 additions & 2 deletions dnsimple/struct/domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ class Domain(Struct):
"""True if the domain is set to auto-renew, false otherwise"""
private_whois = False
"""True if the domain WHOIS privacy is enabled, false otherwise"""
trustee_service = False
"""True if the domain Trustee service is enabled, false otherwise"""
trustee = False
"""True if the domain trustee is enabled, false otherwise"""
expires_at = None
"""The date the domain will expire"""
created_at = None
Expand Down
4 changes: 2 additions & 2 deletions dnsimple/struct/domain_price.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class DomainPrice(Struct):
"""The domain's renewal price"""
transfer_price = None
"""The domain's transfer price"""
trustee_service_price = None
"""The domain's Trustee service price"""
trustee_price = None
"""The domain's trustee price"""
def __init__(self, data):
super().__init__(data)
8 changes: 4 additions & 4 deletions dnsimple/struct/domain_registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def __init__(
auto_renew=False,
extended_attributes=None,
premium_price=None,
trustee_service=None,
trustee=None,
):
dict.__init__(
self,
Expand All @@ -25,7 +25,7 @@ def __init__(
auto_renew=auto_renew,
extended_attributes=extended_attributes,
premium_price=premium_price,
trustee_service=trustee_service,
trustee=trustee,
)

def to_json(self):
Expand All @@ -49,8 +49,8 @@ class DomainRegistration(Struct):
"""True if the domain auto-renew was requested"""
whois_privacy = False
"""True if the domain WHOIS privacy was requested"""
trustee_service = False
"""True if the domain Trustee service was requested"""
trustee = False
"""True if trustee was requested"""
created_at = None
"""When the domain renewal was created in DNSimple"""
updated_at = None
Expand Down
8 changes: 4 additions & 4 deletions dnsimple/struct/domain_transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def __init__(
auto_renew=False,
extended_attributes=None,
premium_price=None,
trustee_service=None,
trustee=None,
):
dict.__init__(
self,
Expand All @@ -27,7 +27,7 @@ def __init__(
auto_renew=auto_renew,
extended_attributes=extended_attributes,
premium_price=premium_price,
trustee_service=trustee_service,
trustee=trustee,
)

def to_json(self):
Expand All @@ -49,8 +49,8 @@ class DomainTransfer(Struct):
"""True if the domain auto-renew was requested"""
whois_privacy = False
"""True if the domain WHOIS privacy was requested"""
trustee_service = False
"""True if the domain Trustee service was requested"""
trustee = False
"""True if trustee was requested"""
created_at = None
"""When the domain transfer was created in DNSimple"""
updated_at = None
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"}}
2 changes: 1 addition & 1 deletion tests/service/domains_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def test_retrieves_a_domain(self):
domain = self.domains.get_domain(1010, 1).data

self.assertEqual('example-alpha.com', domain.name)
self.assertFalse(domain.trustee_service)
self.assertFalse(domain.trustee)

@responses.activate
def test_deletes_a_domain(self):
Expand Down
12 changes: 6 additions & 6 deletions tests/service/registrar_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def test_get_domain_prices(self):
self.assertEqual(20.0, domain_prices.registration_price)
self.assertEqual(20.0, domain_prices.renewal_price)
self.assertEqual(20.0, domain_prices.transfer_price)
self.assertEqual(20.0, domain_prices.trustee_service_price)
self.assertEqual(20.0, domain_prices.trustee_price)

@responses.activate
def test_get_domain_prices_for_unsupported_tld(self):
Expand All @@ -58,7 +58,7 @@ def test_get_domain_registration(self):
self.assertEqual(domain_registration.state, "registering")
self.assertEqual(domain_registration.auto_renew, False)
self.assertEqual(domain_registration.whois_privacy, False)
self.assertEqual(domain_registration.trustee_service, False)
self.assertEqual(domain_registration.trustee, False)
self.assertEqual(domain_registration.created_at, "2023-01-27T17:44:32Z")
self.assertEqual(domain_registration.updated_at, "2023-01-27T17:44:40Z")

Expand Down Expand Up @@ -90,7 +90,7 @@ def test_register_domain(self):
self.assertEqual('new', domain_registration.state)
self.assertFalse(domain_registration.auto_renew)
self.assertFalse(domain_registration.whois_privacy)
self.assertFalse(domain_registration.trustee_service)
self.assertFalse(domain_registration.trustee)
self.assertEqual('2016-12-09T19:35:31Z', domain_registration.created_at)
self.assertEqual('2016-12-09T19:35:31Z', domain_registration.updated_at)

Expand All @@ -108,7 +108,7 @@ def test_transfer_domain(self):
self.assertEqual('transferring', domain_transfer.state)
self.assertFalse(domain_transfer.auto_renew)
self.assertFalse(domain_transfer.whois_privacy)
self.assertFalse(domain_transfer.trustee_service)
self.assertFalse(domain_transfer.trustee)
self.assertEqual('2016-12-09T19:43:41Z', domain_transfer.created_at)
self.assertEqual('2016-12-09T19:43:43Z', domain_transfer.updated_at)

Expand Down Expand Up @@ -141,7 +141,7 @@ def test_get_domain_transfer(self):
domain_transfer = self.registrar.get_domain_transfer(1010, 'ruby.codes', 358).data

self.assertEqual('cancelled', domain_transfer.state)
self.assertFalse(domain_transfer.trustee_service)
self.assertFalse(domain_transfer.trustee)

@responses.activate
def test_cancel_domain_transfer(self):
Expand All @@ -151,7 +151,7 @@ def test_cancel_domain_transfer(self):
domain_transfer = self.registrar.cancel_domain_transfer(1010, 'ruby.codes', 358).data

self.assertEqual('transferring', domain_transfer.state)
self.assertFalse(domain_transfer.trustee_service)
self.assertFalse(domain_transfer.trustee)

@responses.activate
def test_renew_domain(self):
Expand Down