From 171afd28496370427f8b6f5a8d387b806c164975 Mon Sep 17 00:00:00 2001 From: Parman Date: Mon, 15 Sep 2025 01:15:37 +0330 Subject: [PATCH] Fix hlrvalidation typo and update docs URL --- examples/sms_example.py | 2 +- pyproject.toml | 2 +- src/devhub_python/models/sms.py | 4 ++-- src/devhub_python/resources/sms.py | 8 ++++---- tests/test_sms.py | 10 +++++----- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/examples/sms_example.py b/examples/sms_example.py index 8a500d3..2e1f600 100644 --- a/examples/sms_example.py +++ b/examples/sms_example.py @@ -32,7 +32,7 @@ def main(): recipient=recipient, message=message, sender=sender, - hirvalidation=True, # Enable high-quality routing validation + hlrvalidation=True, # Enable high-quality routing validation ) print("SMS sent successfully!") diff --git a/pyproject.toml b/pyproject.toml index 223113a..b91eba0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,7 +51,7 @@ docs = [ [project.urls] Homepage = "https://github.com/devotel/devhub-python" -Documentation = "https://devhub-python.readthedocs.io" +Documentation = "https://devotel.github.io/devhub-python/" Repository = "https://github.com/devotel/devhub-python" Issues = "https://github.com/devotel/devhub-python/issues" diff --git a/src/devhub_python/models/sms.py b/src/devhub_python/models/sms.py index 4f9a651..370c719 100644 --- a/src/devhub_python/models/sms.py +++ b/src/devhub_python/models/sms.py @@ -15,7 +15,7 @@ class SMSQuickSendRequest(BaseModel): sender: str = Field(..., description="Sender phone number or ID") recipient: str = Field(..., description="Recipient phone number in E.164 format") message: str = Field(..., description="SMS message content") - hirvalidation: bool = Field(True, description="Enable HIR validation") + hlrvalidation: bool = Field(True, description="Enable HIR validation") class NumberPurchaseRequest(BaseModel): @@ -62,7 +62,7 @@ class SMSQuickSendResponse(BaseModel): api_route: Optional[str] = Field(None, description="API route used") apimode: Optional[str] = Field(None, description="API mode") quicksendidentifier: Optional[str] = Field(None, description="Quick send identifier") - hirvalidation: Optional[bool] = Field(None, description="HIR validation enabled") + hlrvalidation: Optional[bool] = Field(None, description="HIR validation enabled") # Error response fields statusCode: Optional[int] = Field(None, description="HTTP status code for errors") diff --git a/src/devhub_python/resources/sms.py b/src/devhub_python/resources/sms.py index 9aeff25..96dd750 100644 --- a/src/devhub_python/resources/sms.py +++ b/src/devhub_python/resources/sms.py @@ -57,7 +57,7 @@ def send_sms( recipient: str, message: str, sender: str, - hirvalidation: bool = True, + hlrvalidation: bool = True, sandbox: bool = False, ) -> "SMSQuickSendResponse": """ @@ -67,7 +67,7 @@ def send_sms( recipient: The recipient's phone number in E.164 format message: The SMS message content sender: The sender phone number or sender ID - hirvalidation: Enable HIR validation (default: True) + hlrvalidation: Enable HIR validation (default: True) sandbox: Use sandbox environment for testing (default: False) Returns: @@ -100,7 +100,7 @@ def send_sms( sender=sender, recipient=recipient, message=message, - hirvalidation=hirvalidation, + hlrvalidation=hlrvalidation, ) # Send request to the exact API endpoint @@ -327,5 +327,5 @@ def send( recipient=to, message=body, sender=from_, - hirvalidation=kwargs.get("hirvalidation", True), + hlrvalidation=kwargs.get("hlrvalidation", True), ) diff --git a/tests/test_sms.py b/tests/test_sms.py index e37f171..4e620bc 100644 --- a/tests/test_sms.py +++ b/tests/test_sms.py @@ -38,7 +38,7 @@ def test_send_sms_success(self, sms_resource, test_phone_number): "api_route": "user-api/sms/quick-send", "apimode": "quick-send", "quicksendidentifier": "quick_123", - "hirvalidation": True, + "hlrvalidation": True, } sms_resource.client.post.return_value = mock_response @@ -47,7 +47,7 @@ def test_send_sms_success(self, sms_resource, test_phone_number): recipient=test_phone_number, message="Hello, World!", sender="+1987654321", - hirvalidation=True, + hlrvalidation=True, ) # Verify the response @@ -55,7 +55,7 @@ def test_send_sms_success(self, sms_resource, test_phone_number): assert result.recipient == test_phone_number assert result.message == "Hello, World!" assert result.status == "queued" - assert result.hirvalidation is True + assert result.hlrvalidation is True # Verify the API call sms_resource.client.post.assert_called_once_with( @@ -64,7 +64,7 @@ def test_send_sms_success(self, sms_resource, test_phone_number): "sender": "+1987654321", "recipient": test_phone_number, "message": "Hello, World!", - "hirvalidation": True, + "hlrvalidation": True, }, sandbox=False, ) @@ -319,7 +319,7 @@ def test_legacy_send_method(self, sms_resource, test_phone_number): "api_route": "user-api/sms/quick-send", "apimode": "quick-send", "quicksendidentifier": "quick_123", - "hirvalidation": True, + "hlrvalidation": True, } sms_resource.client.post.return_value = mock_response