Class: HubSpotSDK::Resources::Crm::Owners

Inherits:
Object
  • Object
show all
Defined in:
lib/hubspot_sdk/resources/crm/owners.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Owners

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Owners.

Parameters:



68
69
70
# File 'lib/hubspot_sdk/resources/crm/owners.rb', line 68

def initialize(client:)
  @client = client
end

Instance Method Details

#get(owner_id, archived: nil, id_property: nil, request_options: {}) ⇒ HubSpotSDK::Models::Crm::PublicOwner

Retrieve details of a specific owner using either their ‘id’ or ‘userId’.

Parameters:

Returns:

See Also:



53
54
55
56
57
58
59
60
61
62
63
# File 'lib/hubspot_sdk/resources/crm/owners.rb', line 53

def get(owner_id, params = {})
  parsed, options = HubSpotSDK::Crm::OwnerGetParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: ["crm/owners/2026-03/%1$s", owner_id],
    query: query.transform_keys(id_property: "idProperty"),
    model: HubSpotSDK::Crm::PublicOwner,
    options: options
  )
end

#list(after: nil, archived: nil, email: nil, limit: nil, request_options: {}) ⇒ HubSpotSDK::Internal::Page<HubSpotSDK::Models::Crm::PublicOwner>

Some parameter documentations has been truncated, see Models::Crm::OwnerListParams for more details.

Parameters:

  • after (String)

    The paging cursor token of the last successfully read resource will be returned

  • archived (Boolean)

    Whether to return only results that have been archived.

  • email (String)

    Filter by email address (optional)

  • limit (Integer)

    The maximum number of results to display per page.

  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/hubspot_sdk/resources/crm/owners.rb', line 25

def list(params = {})
  parsed, options = HubSpotSDK::Crm::OwnerListParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "crm/owners/2026-03",
    query: query,
    page: HubSpotSDK::Internal::Page,
    model: HubSpotSDK::Crm::PublicOwner,
    options: options
  )
end