Class: HubSpotSDK::Resources::Crm::Objects::PartnerServices

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

Defined Under Namespace

Classes: Batch

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ PartnerServices

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

Parameters:



170
171
172
173
# File 'lib/hubspot_sdk/resources/crm/objects/partner_services.rb', line 170

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

Instance Attribute Details

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



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

def batch
  @batch
end

Instance Method Details

#get(partner_service_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::PartnerServiceGetParams for more details.

Read an Object identified by ‘partnerServiceId`. `partnerServiceId` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Control what is returned via the `properties` query param.

Parameters:

  • partner_service_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:



118
119
120
121
122
123
124
125
126
127
128
129
130
131
# File 'lib/hubspot_sdk/resources/crm/objects/partner_services.rb', line 118

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

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

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

Retrieve a list of associations for a specific partner service, filtered by the type of associated object.

Parameters:

  • to_object_type (String)

    Path param

  • partner_service_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:



70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# File 'lib/hubspot_sdk/resources/crm/objects/partner_services.rb', line 70

def list(to_object_type, params)
  parsed, options = HubSpotSDK::Crm::Objects::PartnerServiceListParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed)
  partner_service_id =
    parsed.delete(:partner_service_id) do
      raise ArgumentError.new("missing required path argument #{_1}")
    end
  @client.request(
    method: :get,
    path: [
      "crm/objects/2026-03/partner_services/%1$s/associations/%2$s",
      partner_service_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 query to find partner services based on defined filters, properties, and sorting options. This endpoint allows you to retrieve a collection of partner services that match the specified search criteria.

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:



156
157
158
159
160
161
162
163
164
165
# File 'lib/hubspot_sdk/resources/crm/objects/partner_services.rb', line 156

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

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

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

Perform a partial update of an Object identified by ‘partnerServiceId`or optionally a unique property value as specified by the `idProperty` query param. `partnerServiceId` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string.

Parameters:

  • partner_service_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:



35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/hubspot_sdk/resources/crm/objects/partner_services.rb', line 35

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