Skip to content

Commit 3ff2289

Browse files
authored
Remove deprecated Certificate contact_id field (#501)
The `contact_id` field in the Certificate schema was deprecated on 2022-05-17 and is no longer required for certificate operations. Remove `contact_id` from the `Certificate` struct and from `LetsencryptCertificateInput`. This is a breaking change. References dnsimple/dnsimple-developer#987
1 parent 719530d commit 3ff2289

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
This project uses [Semantic Versioning 2.0.0](http://semver.org/), the format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
44

5+
## main
6+
7+
### Removed
8+
9+
- **BREAKING**: Removed the deprecated `contact_id` field from the `Certificate` struct and from `LetsencryptCertificateInput`. The field was deprecated on 2022-05-17 and is no longer required for certificate operations.
10+
511
## 7.3.0 - 2026-04-15
612

713
### Added

dnsimple/struct/certificate.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
from dataclasses import dataclass
33

44
import omitempty
5-
import warnings
65

76
from dnsimple.struct import Struct
87

@@ -15,8 +14,6 @@ class Certificate(Struct):
1514
"""The certificate ID in DNSimple"""
1615
domain_id = None
1716
"""The associated domain ID"""
18-
contact_id = None
19-
"""The associated contact ID"""
2017
name = None
2118
"""The certificate name"""
2219
common_name = None
@@ -61,10 +58,8 @@ def __init__(self, data):
6158

6259

6360
class LetsencryptCertificateInput(dict):
64-
def __init__(self, contact_id=None, auto_renew=None, name=None, alternate_names=None, signature_algorithm=None):
61+
def __init__(self, auto_renew=None, name=None, alternate_names=None, signature_algorithm=None):
6562
dict.__init__(self, auto_renew=auto_renew, name=name, alternate_names=alternate_names, signature_algorithm=signature_algorithm)
66-
if contact_id is not None:
67-
warnings.warn("DEPRECATION WARNING: LetsencryptCertificateInput#contact_id is deprecated and its value is ignored and will be removed in the next major version.")
6863

6964

7065
def to_json(self):

tests/service/certificates_test.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ def test_get_certificate(self):
3737

3838
self.assertIsInstance(certificate.id, int)
3939
self.assertIsInstance(certificate.domain_id, int)
40-
self.assertIsInstance(certificate.contact_id, int)
4140
self.assertEqual('www', certificate.name)
4241
self.assertEqual('www.bingo.pizza', certificate.common_name)
4342
self.assertEqual(1, certificate.years)
@@ -150,7 +149,7 @@ def test_purchase_letsencrypt_certificate(self):
150149
path='/1010/domains/example.com/certificates/letsencrypt',
151150
fixture_name='purchaseLetsencryptCertificate/success'))
152151
certificate_purchase = self.certificates.purchase_letsencrypt_certificate(1010, 'example.com',
153-
LetsencryptCertificateInput(42)).data
152+
LetsencryptCertificateInput()).data
154153

155154
self.assertEqual(101967, certificate_purchase.id)
156155
self.assertEqual(101967, certificate_purchase.certificate_id)

0 commit comments

Comments
 (0)