Class: HubSpotSDK::Resources::Crm::Objects::PartnerClients

Inherits:
Object
  • Object
show all
Defined in:
lib/hubspot_sdk/resources/crm/objects/partner_clients.rb,
lib/hubspot_sdk/resources/crm/objects/partner_clients/batch.rb

Defined Under Namespace

Classes: Batch

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ PartnerClients

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 PartnerClients.

Parameters:



204
205
206
207
# File 'lib/hubspot_sdk/resources/crm/objects/partner_clients.rb', line 204

def initialize(client:)
  @client = client
  @batch = HubSpotSDK::Resources::Crm::Objects::PartnerClients::Batch.new(client: client)
end

Instance Attribute Details

#batchHubSpotSDK::Resources::Crm::Objects::PartnerClients::Batch (readonly)



9
10
11
# File 'lib/hubspot_sdk/resources/crm/objects/partner_clients.rb', line 9

def batch
  @batch
end

Instance Method Details

#get(partner_client_id, archived: nil, associations: nil, id_property: nil, properties: nil, properties_with_history: nil, request_options: {}) ⇒ HubSpotSDK::Models::Crm::SimplePublicObjectWithAssociations

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

Retrieve detailed information about a specific partner client, including selected properties and associations. This endpoint is useful for accessing comprehensive client data for analysis or integration purposes.

Parameters:

  • partner_client_id (String)
  • archived (Boolean)

    Whether to return only results that have been archived.

  • associations (Array<String>)

    A comma separated list of object types to retrieve associated IDs for. If any of

  • id_property (String)

    The name of a property whose values are unique for this object type

  • properties (Array<String>)

    A comma separated list of the properties to be returned in the response. If any

  • properties_with_history (Array<String>)

    A comma separated list of the properties to be returned along with their history

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

Returns:

See Also:



108
109
110
111
112
113
114
115
116
117
118
119
120
121
# File 'lib/hubspot_sdk/resources/crm/objects/partner_clients.rb', line 108

def get(partner_client_id, params = {})
  parsed, options = HubSpotSDK::Crm::Objects::PartnerClientGetParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: ["crm/objects/2026-03/partner_clients/%1$s", partner_client_id],
    query: query.transform_keys(
      id_property: "idProperty",
      properties_with_history: "propertiesWithHistory"
    ),
    model: HubSpotSDK::Crm::SimplePublicObjectWithAssociations,
    options: options
  )
end

#list(after: nil, archived: nil, associations: nil, limit: nil, properties: nil, properties_with_history: nil, request_options: {}) ⇒ HubSpotSDK::Internal::Page<HubSpotSDK::Models::Crm::SimplePublicObjectWithAssociations>

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

Retrieve a list of partner clients with optional filtering by deleted status, associations, and specific properties. The response can be paginated using the ‘after’ parameter.

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.

  • associations (Array<String>)

    A comma separated list of object types to retrieve associated IDs for. If any of

  • limit (Integer)

    The maximum number of results to display per page.

  • properties (Array<String>)

    A comma separated list of the properties to be returned in the response. If any

  • properties_with_history (Array<String>)

    A comma separated list of the properties to be returned along with their history

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

Returns:

See Also:



69
70
71
72
73
74
75
76
77
78
79
80
# File 'lib/hubspot_sdk/resources/crm/objects/partner_clients.rb', line 69

def list(params = {})
  parsed, options = HubSpotSDK::Crm::Objects::PartnerClientListParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "crm/objects/2026-03/partner_clients",
    query: query.transform_keys(properties_with_history: "propertiesWithHistory"),
    page: HubSpotSDK::Internal::Page,
    model: HubSpotSDK::Crm::SimplePublicObjectWithAssociations,
    options: options
  )
end

#list_associations(to_object_type, partner_client_id:, after: nil, limit: nil, request_options: {}) ⇒ HubSpotSDK::Internal::Page<HubSpotSDK::Models::Crm::MultiAssociatedObjectWithLabel>

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

Retrieve a list of associations for a specific partner client based on the specified object type.

Parameters:

  • to_object_type (String)

    Path param

  • partner_client_id (String)

    Path param

  • after (String)

    Query param: The paging cursor token of the last successfully read resource will

  • limit (Integer)

    Query param: The maximum number of results to display per page.

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

Returns:

See Also:



145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
# File 'lib/hubspot_sdk/resources/crm/objects/partner_clients.rb', line 145

def list_associations(to_object_type, params)
  parsed, options = HubSpotSDK::Crm::Objects::PartnerClientListAssociationsParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed)
  partner_client_id =
    parsed.delete(:partner_client_id) do
      raise ArgumentError.new("missing required path argument #{_1}")
    end
  @client.request(
    method: :get,
    path: [
      "crm/objects/2026-03/partner_clients/%1$s/associations/%2$s",
      partner_client_id,
      to_object_type
    ],
    query: query,
    page: HubSpotSDK::Internal::Page,
    model: HubSpotSDK::Crm::MultiAssociatedObjectWithLabel,
    options: options
  )
end

#search(after:, filter_groups:, limit:, properties:, sorts:, query: nil, request_options: {}) ⇒ HubSpotSDK::Models::Crm::CollectionResponseWithTotalSimplePublicObject

Execute a search for partner clients based on defined filters, properties, and sorting options. This endpoint allows you to retrieve partner client data that matches the search criteria, facilitating integration and data synchronization with third-party systems.

Parameters:

  • after (String)

    A paging cursor token for retrieving subsequent pages.

  • filter_groups (Array<HubSpotSDK::Models::Crm::FilterGroup>)

    Up to 6 groups of filters defining additional query criteria.

  • limit (Integer)

    The maximum results to return, up to 200 objects.

  • properties (Array<String>)

    A list of property names to include in the response.

  • sorts (Array<String>)

    Specifies sorting order based on object properties.

  • query (String)

    The search query string, up to 3000 characters.

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

Returns:

See Also:



190
191
192
193
194
195
196
197
198
199
# File 'lib/hubspot_sdk/resources/crm/objects/partner_clients.rb', line 190

def search(params)
  parsed, options = HubSpotSDK::Crm::Objects::PartnerClientSearchParams.dump_request(params)
  @client.request(
    method: :post,
    path: "crm/objects/2026-03/partner_clients/search",
    body: parsed,
    model: HubSpotSDK::Crm::CollectionResponseWithTotalSimplePublicObject,
    options: options
  )
end

#update(partner_client_id, properties:, id_property: nil, request_options: {}) ⇒ HubSpotSDK::Models::Crm::SimplePublicObject

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

Update the specified properties of an existing partner client.

Parameters:

  • partner_client_id (String)

    Path param

  • properties (Hash{Symbol=>String})

    Body param: Key value pairs representing the properties of the object.

  • id_property (String)

    Query param: The name of a property whose values are unique for this object type

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

Returns:

See Also:



29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/hubspot_sdk/resources/crm/objects/partner_clients.rb', line 29

def update(partner_client_id, params)
  query_params = [:id_property]
  parsed, options = HubSpotSDK::Crm::Objects::PartnerClientUpdateParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed.slice(*query_params))
  @client.request(
    method: :patch,
    path: ["crm/objects/2026-03/partner_clients/%1$s", partner_client_id],
    query: query.transform_keys(id_property: "idProperty"),
    body: parsed.except(*query_params),
    model: HubSpotSDK::Crm::SimplePublicObject,
    options: options
  )
end