Skip to content

Commit 05e9869

Browse files
author
Jack Chen
authored
change desired_delivery_date to str instead of key-word args (#340)
1 parent 8ea650a commit 05e9869

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

easypost/services/shipment_service.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,12 @@ def retrieve_estimated_delivery_date(self, id: str, planned_ship_date: str) -> L
154154

155155
return convert_to_easypost_object(response=response.get("rates", []))
156156

157-
def recommend_ship_date(self, id: str, **params) -> List[Dict[str, Any]]:
157+
def recommend_ship_date(self, id: str, desired_delivery_date: str) -> List[Dict[str, Any]]:
158158
"""Retrieve a recommended ship date for an existing Shipment via the Precision Shipping API,
159159
based on a specific desired delivery date.
160160
"""
161161
url = f"{self._instance_url(self._model_class, id)}/smartrate/precision_shipping"
162-
162+
params = {"desired_delivery_date": desired_delivery_date}
163163
response = Requestor(self._client).request(method=RequestMethod.GET, url=url, params=params)
164164

165165
return convert_to_easypost_object(response=response.get("rates", []))

0 commit comments

Comments
 (0)