From 435f04edd970c4d6081745701263bd5ac6f64582 Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Fri, 13 Jun 2025 15:09:37 -0600 Subject: [PATCH] fix: luma response --- easypost/services/luma_service.py | 2 +- tests/test_luma.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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