From e29b47d588c48e16fb82320903e4dcd2b4a1f791 Mon Sep 17 00:00:00 2001 From: Rikki Prince Date: Wed, 21 May 2025 17:30:08 -0600 Subject: [PATCH] Documented `get_by_id` It was very unclear from the documentation and the generated code that `owner_id` has to be passed in as a keyword argument. Passing it as a positional argument with an unclear error. --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 0b546ae7..29efe6ca 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,20 @@ You'll need to create a [private app](https://developers.hubspot.com/docs/api/pr Please note that pagination is used under the hood to get all results. +### Get one + +`get_by_id` method is available for all objects. + +```ruby +client = Hubspot::Client.new(access_token: 'your_oauth2_access_token') +user = client.crm.owners.owners_api.get_by_id(owner_id: ]) +``` + +Tip: If you are unsure what property name to pass in, call the method with no parameters and the name at the end of the error message will tell you: + +`#` => **owner_id** + + ## Search `do_search` method is available for all objects (Companies, Contacts, Deals and etc).