From 540054e12f83514aa5baf2861235514e4450bae1 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Wed, 8 Apr 2026 14:53:11 +0000 Subject: [PATCH] rename method --- backend/hubspot_trigger_orchestrator/handler.py | 4 ++-- etl/hubspot/hubspotClient.py | 2 +- etl/hubspot/hubspotDataTodB.py | 4 ++-- etl/hubspot/scripts/scraper/main.py | 4 ++-- etl/hubspot/tests/test_hubspot_client_integration.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/backend/hubspot_trigger_orchestrator/handler.py b/backend/hubspot_trigger_orchestrator/handler.py index c79fe2b9..38724812 100644 --- a/backend/hubspot_trigger_orchestrator/handler.py +++ b/backend/hubspot_trigger_orchestrator/handler.py @@ -41,8 +41,8 @@ def handler(event: Mapping[str, Any], context: Any) -> None: company: Optional[str] listing: Optional[dict[str, str]] - hubspot_deal, company, listing = hubspot_client.get_deal_company_listing( - hubspot_deal_id + hubspot_deal, company, listing = ( + hubspot_client.get_deal_and_company_and_listing(hubspot_deal_id) ) if HubspotDealDiffer.check_for_pashub_trigger( diff --git a/etl/hubspot/hubspotClient.py b/etl/hubspot/hubspotClient.py index 777ad482..cedaa7f3 100644 --- a/etl/hubspot/hubspotClient.py +++ b/etl/hubspot/hubspotClient.py @@ -279,7 +279,7 @@ class HubspotClient: deal_info: dict[str, str] = cast(dict[str, str], deal.properties) # type: ignore[reportUnknownMemberType] return deal_info - def get_deal_company_listing( + def get_deal_and_company_and_listing( self, deal_id: str ) -> tuple[dict[str, str], Optional[str], Optional[dict[str, str]]]: diff --git a/etl/hubspot/hubspotDataTodB.py b/etl/hubspot/hubspotDataTodB.py index 49dd1685..e7008618 100644 --- a/etl/hubspot/hubspotDataTodB.py +++ b/etl/hubspot/hubspotDataTodB.py @@ -111,8 +111,8 @@ class HubspotDataToDb: print(f"🔍 Checking if deal needs updating (deal_id={deal_in_db.deal_id})") - hs_deal, hs_company_id, hs_listing = hubspot_client.get_deal_company_listing( - deal_in_db.deal_id + hs_deal, hs_company_id, hs_listing = ( + hubspot_client.get_deal_and_company_and_listing(deal_in_db.deal_id) ) # Soft compare key fields diff --git a/etl/hubspot/scripts/scraper/main.py b/etl/hubspot/scripts/scraper/main.py index e5658a20..d8d4a357 100644 --- a/etl/hubspot/scripts/scraper/main.py +++ b/etl/hubspot/scripts/scraper/main.py @@ -27,8 +27,8 @@ def handler(body: dict[str, Any], context: Any) -> None: company: Optional[str] listing: Optional[dict[str, str]] - hubspot_deal, company, listing = hubspot_client.get_deal_company_listing( - hubspot_deal_id + hubspot_deal, company, listing = ( + hubspot_client.get_deal_and_company_and_listing(hubspot_deal_id) ) if company: diff --git a/etl/hubspot/tests/test_hubspot_client_integration.py b/etl/hubspot/tests/test_hubspot_client_integration.py index d0dd818a..0f4b425c 100644 --- a/etl/hubspot/tests/test_hubspot_client_integration.py +++ b/etl/hubspot/tests/test_hubspot_client_integration.py @@ -71,7 +71,7 @@ class TestHubspotClientIntegration: def test_get_deal_info_for_db(self, client: HubspotClient): deal_id: str = "263490768079" - deal, company, listing = client.get_deal_company_listing(deal_id) + deal, company, listing = client.get_deal_and_company_and_listing(deal_id) assert "dealname" in deal assert "dealstage" in deal