Class: HubSpotSDK::Resources::Crm::Owners
- Inherits:
-
Object
- Object
- HubSpotSDK::Resources::Crm::Owners
- Defined in:
- lib/hubspot_sdk/resources/crm/owners.rb
Instance Method Summary collapse
-
#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’.
-
#initialize(client:) ⇒ Owners
constructor
private
A new instance of Owners.
-
#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.
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.
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’.
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, = 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: ) 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.
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, = 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: ) end |