Skip to content

Commit 2909bed

Browse files
Rename trustee JSON fields and refresh v2 API fixtures (#505)
1 parent 92e71df commit 2909bed

14 files changed

Lines changed: 27 additions & 27 deletions

File tree

dnsimple/struct/domain.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ class Domain(Struct):
2727
"""True if the domain is set to auto-renew, false otherwise"""
2828
private_whois = False
2929
"""True if the domain WHOIS privacy is enabled, false otherwise"""
30-
trustee_service = False
31-
"""True if the domain Trustee service is enabled, false otherwise"""
30+
trustee = False
31+
"""True if the domain trustee is enabled, false otherwise"""
3232
expires_at = None
3333
"""The date the domain will expire"""
3434
created_at = None

dnsimple/struct/domain_price.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class DomainPrice(Struct):
1919
"""The domain's renewal price"""
2020
transfer_price = None
2121
"""The domain's transfer price"""
22-
trustee_service_price = None
23-
"""The domain's Trustee service price"""
22+
trustee_price = None
23+
"""The domain's trustee price"""
2424
def __init__(self, data):
2525
super().__init__(data)

dnsimple/struct/domain_registration.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def __init__(
1616
auto_renew=False,
1717
extended_attributes=None,
1818
premium_price=None,
19-
trustee_service=None,
19+
trustee=None,
2020
):
2121
dict.__init__(
2222
self,
@@ -25,7 +25,7 @@ def __init__(
2525
auto_renew=auto_renew,
2626
extended_attributes=extended_attributes,
2727
premium_price=premium_price,
28-
trustee_service=trustee_service,
28+
trustee=trustee,
2929
)
3030

3131
def to_json(self):
@@ -49,8 +49,8 @@ class DomainRegistration(Struct):
4949
"""True if the domain auto-renew was requested"""
5050
whois_privacy = False
5151
"""True if the domain WHOIS privacy was requested"""
52-
trustee_service = False
53-
"""True if the domain Trustee service was requested"""
52+
trustee = False
53+
"""True if trustee was requested"""
5454
created_at = None
5555
"""When the domain renewal was created in DNSimple"""
5656
updated_at = None

dnsimple/struct/domain_transfer.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def __init__(
1717
auto_renew=False,
1818
extended_attributes=None,
1919
premium_price=None,
20-
trustee_service=None,
20+
trustee=None,
2121
):
2222
dict.__init__(
2323
self,
@@ -27,7 +27,7 @@ def __init__(
2727
auto_renew=auto_renew,
2828
extended_attributes=extended_attributes,
2929
premium_price=premium_price,
30-
trustee_service=trustee_service,
30+
trustee=trustee,
3131
)
3232

3333
def to_json(self):
@@ -49,8 +49,8 @@ class DomainTransfer(Struct):
4949
"""True if the domain auto-renew was requested"""
5050
whois_privacy = False
5151
"""True if the domain WHOIS privacy was requested"""
52-
trustee_service = False
53-
"""True if the domain Trustee service was requested"""
52+
trustee = False
53+
"""True if trustee was requested"""
5454
created_at = None
5555
"""When the domain transfer was created in DNSimple"""
5656
updated_at = None

tests/fixtures/v2/api/cancelDomainTransfer/success.http

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ x-xss-protection: 1; mode=block
1515
x-download-options: noopen
1616
x-permitted-cross-domain-policies: none
1717

18-
{"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"}}
18+
{"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"}}

tests/fixtures/v2/api/getDomain/success.http

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ x-download-options: noopen
1717
x-permitted-cross-domain-policies: none
1818
strict-transport-security: max-age=31536000
1919

20-
{"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"}}
20+
{"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"}}

tests/fixtures/v2/api/getDomainPrices/success.http

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ x-permitted-cross-domain-policies: none
1818
content-security-policy: frame-ancestors 'none'
1919
strict-transport-security: max-age=31536000
2020

21-
{"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}}
21+
{"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}}

tests/fixtures/v2/api/getDomainRegistration/success.http

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ x-download-options: noopen
1717
x-permitted-cross-domain-policies: none
1818
strict-transport-security: max-age=31536000
1919

20-
{"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"}}
20+
{"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"}}

tests/fixtures/v2/api/getDomainTransfer/success.http

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ x-download-options: noopen
1717
x-permitted-cross-domain-policies: none
1818
strict-transport-security: max-age=31536000
1919

20-
{"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"}}
20+
{"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"}}

tests/fixtures/v2/api/listCharges/success.http

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ cache-control: no-store, must-revalidate, private, max-age=0
99
x-request-id: a57a87c8-626a-4361-9fb8-b55ca9be8e5d
1010
x-runtime: 0.060526
1111

12-
{"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}}
12+
{"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}}

0 commit comments

Comments
 (0)