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

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

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Batch

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

Parameters:



73
74
75
# File 'lib/hubspot_sdk/resources/crm/objects/partner_services/batch.rb', line 73

def initialize(client:)
  @client = client
end

Instance Method Details

#get(inputs:, properties:, properties_with_history:, archived: nil, id_property: nil, request_options: {}) ⇒ HubSpotSDK::Models::Crm::BatchResponseSimplePublicObject

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

Retrieve records by record ID or include the ‘idProperty` parameter to retrieve records by a custom unique value property.

Parameters:

  • inputs (Array<HubSpotSDK::Models::Crm::SimplePublicObjectID>)

    Body param

  • properties (Array<String>)

    Body param: Key-value pairs for setting properties for the new object.

  • properties_with_history (Array<String>)

    Body param: Key-value pairs for setting properties for the new object and their

  • archived (Boolean)

    Query param: Whether to return only results that have been archived.

  • id_property (String)

    Body param: When using a custom unique value property to retrieve records, the n

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

Returns:

See Also:



56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/hubspot_sdk/resources/crm/objects/partner_services/batch.rb', line 56

def get(params)
  query_params = [:archived]
  parsed, options = HubSpotSDK::Crm::Objects::PartnerServices::BatchGetParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed.slice(*query_params))
  @client.request(
    method: :post,
    path: "crm/objects/2026-03/partner_services/batch/read",
    query: query,
    body: parsed.except(*query_params),
    model: HubSpotSDK::Crm::BatchResponseSimplePublicObject,
    options: options
  )
end

#update(inputs:, request_options: {}) ⇒ HubSpotSDK::Models::Crm::BatchResponseSimplePublicObject

Update multiple partner services using their internal IDs or unique property values. This operation allows for batch processing of updates, ensuring efficient synchronization of service data between HubSpot and other systems.



21
22
23
24
25
26
27
28
29
30
# File 'lib/hubspot_sdk/resources/crm/objects/partner_services/batch.rb', line 21

def update(params)
  parsed, options = HubSpotSDK::Crm::Objects::PartnerServices::BatchUpdateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "crm/objects/2026-03/partner_services/batch/update",
    body: parsed,
    model: HubSpotSDK::Crm::BatchResponseSimplePublicObject,
    options: options
  )
end