mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
rename method
This commit is contained in:
parent
b968fbab44
commit
540054e12f
5 changed files with 8 additions and 8 deletions
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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]]]:
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue