diff --git a/easypost/easypost_client.py b/easypost/easypost_client.py index 23159d5..9cf1276 100644 --- a/easypost/easypost_client.py +++ b/easypost/easypost_client.py @@ -76,7 +76,7 @@ def __init__( self.report = ReportService(self) self.scan_form = ScanFormService(self) self.shipment = ShipmentService(self) - self.smartrate = SmartRateService(self) + self.smart_rate = SmartRateService(self) self.tracker = TrackerService(self) self.user = UserService(self) self.webhook = WebhookService(self) diff --git a/easypost/services/smartrate_service.py b/easypost/services/smartrate_service.py index 5034231..666cb7e 100644 --- a/easypost/services/smartrate_service.py +++ b/easypost/services/smartrate_service.py @@ -15,7 +15,7 @@ class SmartRateService(BaseService): def __init__(self, client): self._client = client - self._model_class = "Smartrate" + self._model_class = "SmartRate" def estimate_delivery_date(self, **params) -> List[Dict[str, Any]]: """Retrieve the estimated delivery date of each carrier-service level combination via the diff --git a/tests/test_smartrate.py b/tests/test_smartrate.py index c4f0ac9..8ab2d1e 100644 --- a/tests/test_smartrate.py +++ b/tests/test_smartrate.py @@ -18,7 +18,7 @@ def test_smartrate_estimate_delivery_date( "carriers": [usps], } - rates = test_client.smartrate.estimate_delivery_date(**params) + rates = test_client.smart_rate.estimate_delivery_date(**params) assert all(entry.get("easypost_time_in_transit_data") for entry in rates["results"]) @@ -40,6 +40,6 @@ def test_smartrate_recommend_ship_date( "carriers": [usps], } - rates = test_client.smartrate.recommend_ship_date(**params) + rates = test_client.smart_rate.recommend_ship_date(**params) assert all(entry.get("easypost_time_in_transit_data") for entry in rates["results"])