Skip to content

Commit

Permalink
Merge pull request #341 from EasyPost/smart_rate_naming
Browse files Browse the repository at this point in the history
fix: smart_rate service naming
  • Loading branch information
Justintime50 authored Jul 11, 2024
2 parents 05e9869 + c69397b commit c494087
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion easypost/easypost_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion easypost/services/smartrate_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tests/test_smartrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"])

Expand All @@ -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"])

0 comments on commit c494087

Please sign in to comment.