How to use the hubspot3.crm_associations.Definitions function in hubspot3

To help you get started, we’ve selected a few hubspot3 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jpetrucciani / hubspot3 / hubspot3 / crm_associations.py View on Github external
def link_contact_to_company(self, contact_id: str, company_id: str):
        """Create a new association between a contact and a company."""
        return self.create(
            from_object=contact_id,
            to_object=company_id,
            definition=Definitions.CONTACT_TO_COMPANY,
        )
github jpetrucciani / hubspot3 / hubspot3 / crm_associations.py View on Github external
def link_owner_to_company(self, owner_id: str, company_id: str):
        """Create a new association between an owner and a company."""
        return self.create(
            from_object=owner_id,
            to_object=company_id,
            definition=Definitions.OWNER_TO_COMPANY,
        )
github jpetrucciani / hubspot3 / hubspot3 / crm_associations.py View on Github external
def get_deal_to_lines_items(self, deal_id: str):
        """Get the lines related to a deal."""
        return self.get(object_id=deal_id, definition=Definitions.DEAL_TO_LINE_ITEM)
github jpetrucciani / hubspot3 / hubspot3 / crm_associations.py View on Github external
def get_company_to_deals(self, company_id: str):
        """Get the deals related to a company."""
        return self.get(object_id=company_id, definition=Definitions.COMPANY_TO_DEAL)
github jpetrucciani / hubspot3 / hubspot3 / crm_associations.py View on Github external
def link_line_item_to_deal(self, line_item_id: str, deal_id: str):
        """Create a new association between a line item and a deal."""
        return self.create(
            from_object=line_item_id,
            to_object=deal_id,
            definition=Definitions.LINE_ITEM_TO_DEAL,
        )
github jpetrucciani / hubspot3 / hubspot3 / crm_associations.py View on Github external
def get_company_to_contacts(self, company_id: str):
        """Get the contacts related to a company."""
        return self.get(object_id=company_id, definition=Definitions.COMPANY_TO_CONTACT)