Skip to content

Commit e5076f5

Browse files
authored
fix: adds renewal and billing information to domain model (#29)
1 parent a0d64cd commit e5076f5

1 file changed

Lines changed: 20 additions & 2 deletions

File tree

hostingde/model/domain.py

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ class Domain(Model):
6161
deletion_date: Optional[str]
6262
add_date: Optional[str]
6363
last_change_date: Optional[str]
64+
product_code: Optional[str]
65+
renew_on: Optional[str]
66+
restorable_until: Optional[str]
67+
latest_deletion_date_without_renew: Optional[str]
68+
paid_until: Optional[str]
6469
status: Optional[DomainStatus] = EnumField(DomainStatus)
6570
contacts: List[DomainContactRef] = field(default_factory=list)
6671
nameservers: List[Nameserver] = field(default_factory=list)
@@ -81,6 +86,11 @@ def __init__(
8186
next_contract_period_start: Optional[str] = None,
8287
deletion_type: Optional[str] = None,
8388
deletion_date: Optional[str] = None,
89+
product_code: Optional[str] = None,
90+
renew_on: Optional[str] = None,
91+
restorable_until: Optional[str] = None,
92+
latest_deletion_date_without_renew: Optional[str] = None,
93+
paid_until: Optional[str] = None,
8494
add_date: Optional[str] = None,
8595
last_change_date: Optional[str] = None,
8696
**kwargs: Any
@@ -106,6 +116,11 @@ def __init__(
106116
:param deletion_date: Date the domain is scheduled for deletion or withdrawal. Is empty if domain is not
107117
scheduled for removal.
108118
:param add_date: Date and time this domain was created in or transferred into our system.
119+
:param renew_on: Next renewal date
120+
:param product_code: Code of the product, e.g. domain-co.uk-renewal
121+
:param restorable_until: Latest possible restoration date
122+
:param latest_deletion_date_without_renew: Last time to cancel the renewal process
123+
:param paid_until: How long is the domain paid for
109124
:param last_change_date: Date and time of last modification of any domain data in our system.
110125
:param kwargs:
111126
"""
@@ -126,5 +141,8 @@ def __init__(
126141
self.deletion_date = deletion_date
127142
self.add_date = add_date
128143
self.last_change_date = last_change_date
129-
130-
144+
self.renew_on = renew_on
145+
self.product_code = product_code
146+
self.restorable_until = restorable_until
147+
self.latest_deletion_date_without_renew = latest_deletion_date_without_renew
148+
self.paid_until = paid_until

0 commit comments

Comments
 (0)