Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add org id to hubspot company #3680

Merged
merged 3 commits into from
Mar 27, 2024
Merged

Conversation

zachaysan
Copy link
Contributor

Thanks for submitting a PR! Please check the boxes below:

  • I have run pre-commit to check linting
  • I have added information to docs/ if required so people know about the feature!
  • I have filled in the "Changes" section below?
  • I have filled in the "How did you test this code" section below?
  • I have used a Conventional Commit title for this Pull Request

Changes

On the creation of a Hubspot company resource include the organsation_id in a new field which is titled OrgID in Hubspot, but is only accessible via orgid through the API due to restrictions on Hubspot's end.

How did you test this code?

Manually checked the API response once I was able to set the param in all lowercase then updated an existing test that already checked for the right mocked call to a client resource.

Copy link

vercel bot commented Mar 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview Mar 26, 2024 6:00pm
flagsmith-frontend-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 26, 2024 6:00pm
flagsmith-frontend-staging ✅ Ready (Inspect) Visit Preview Mar 26, 2024 6:00pm

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 75.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 95.84%. Comparing base (3ce1754) to head (6039c45).
Report is 4 commits behind head on main.

Files Patch % Lines
api/integrations/lead_tracking/hubspot/client.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3680   +/-   ##
=======================================
  Coverage   95.84%   95.84%           
=======================================
  Files        1099     1099           
  Lines       34428    34428           
=======================================
  Hits        32999    32999           
  Misses       1429     1429           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

def create_company(self, name: str) -> dict:
properties = {"name": name}
def create_company(self, name: str, organisation_id: int) -> dict:
properties = {"name": name, "orgid": str(organisation_id)}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: I'd love to see the hubspot parameters pulled out as constants in e.g. hubspot.constants.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We discussed offline and decided against it for now.

@zachaysan zachaysan added this pull request to the merge queue Mar 27, 2024
Merged via the queue into main with commit 9952424 Mar 27, 2024
23 checks passed
@zachaysan zachaysan deleted the feat/add_org_id_to_hubspot_company branch March 27, 2024 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Issue related to the REST API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants