diff --git a/easypost/services/luma_service.py b/easypost/services/luma_service.py index 75d5159..1202451 100644 --- a/easypost/services/luma_service.py +++ b/easypost/services/luma_service.py @@ -30,4 +30,4 @@ def get_promise( response = Requestor(self._client).request(method=RequestMethod.POST, url=url, params=wrapped_params) - return convert_to_easypost_object(response=response) + return convert_to_easypost_object(response=response.get("luma_info", {})) diff --git a/tests/test_luma.py b/tests/test_luma.py index d1fcbb4..03380a3 100644 --- a/tests/test_luma.py +++ b/tests/test_luma.py @@ -12,6 +12,6 @@ def test_luma_get_promise( basic_shipment["ruleset_name"] = luma_ruleset_name basic_shipment["planned_ship_date"] = luma_planned_ship_date - recommendations = test_client.luma.get_promise(**basic_shipment) + response = test_client.luma.get_promise(**basic_shipment) - assert recommendations.luma_info.luma_selected_rate is not None + assert response.luma_selected_rate is not None