Skip to content

Commit 756e92d

Browse files
committed
docs: add docstrings to EmergencyCallingService and EmergencyVerification resources
Add comprehensive docstrings documenting all attributes with types and descriptions — status enum values, reject_reasons/reject_comment semantics, callback_url/method, external_reference_id max length, and timestamp fields.
1 parent 1a0084c commit 756e92d

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

src/didww/resources/emergency_calling_service.py

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

33

44
class EmergencyCallingService(DidwwApiModel):
5+
"""Emergency Calling Service subscription resource.
6+
7+
Attributes:
8+
name (str): Human-readable name for the calling service subscription.
9+
reference (str): Server-assigned reference code.
10+
status (str): One of "active", "canceled", "changes required",
11+
"in process", "new", "pending update".
12+
activated_at (datetime): Timestamp when the service became active. None while pending.
13+
canceled_at (datetime): Timestamp when the service was canceled. None when active.
14+
created_at (datetime): Timestamp when the resource was created.
15+
renew_date (datetime): Next renewal date. None when canceled.
16+
"""
17+
518
name = SafeAttributeField("name")
619
reference = SafeAttributeField("reference")
720
status = SafeAttributeField("status")

src/didww/resources/emergency_verification.py

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

33

44
class EmergencyVerification(DidwwApiModel):
5+
"""Emergency Verification resource.
6+
7+
Attributes:
8+
reference (str): Verification reference code.
9+
status (str): One of "pending", "approved", "rejected".
10+
reject_reasons (list[str] | None): List of reject reason codes when status is "rejected".
11+
reject_comment (str | None): Optional free-form comment accompanying a rejection.
12+
callback_url (str): Valid URI for callbacks.
13+
callback_method (str): GET or POST.
14+
external_reference_id (str | None): Customer-supplied reference. Max 100 characters.
15+
created_at (datetime): Timestamp when the resource was created.
16+
"""
17+
518
_writable_attrs = {"callback_url", "callback_method", "external_reference_id"}
619

720
reference = SafeAttributeField("reference")

0 commit comments

Comments
 (0)