Class: HubSpotSDK::Resources::Crm::DealSplits::Batch

Inherits:
Object
  • Object
show all
Defined in:
lib/hubspot_sdk/resources/crm/deal_splits/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:



57
58
59
# File 'lib/hubspot_sdk/resources/crm/deal_splits/batch.rb', line 57

def initialize(client:)
  @client = client
end

Instance Method Details

#read(inputs:, request_options: {}) ⇒ HubSpotSDK::Models::Crm::BatchResponseDealToDealSplits

Read a batch of deal split objects by their associated deal object internal ID

Parameters:

Returns:

See Also:



19
20
21
22
23
24
25
26
27
28
# File 'lib/hubspot_sdk/resources/crm/deal_splits/batch.rb', line 19

def read(params)
  parsed, options = HubSpotSDK::Crm::DealSplits::BatchReadParams.dump_request(params)
  @client.request(
    method: :post,
    path: "deal-splits/2026-03/batch/read",
    body: parsed,
    model: HubSpotSDK::Crm::BatchResponseDealToDealSplits,
    options: options
  )
end

#upsert(inputs:, request_options: {}) ⇒ HubSpotSDK::Models::Crm::BatchResponseDealToDealSplits

Create or replace deal splits for deals with the provided IDs. Deal split percentages for each deal must sum up to 1.0 (100%) and may have up to 8 decimal places

Parameters:

Returns:

See Also:



43
44
45
46
47
48
49
50
51
52
# File 'lib/hubspot_sdk/resources/crm/deal_splits/batch.rb', line 43

def upsert(params)
  parsed, options = HubSpotSDK::Crm::DealSplits::BatchUpsertParams.dump_request(params)
  @client.request(
    method: :post,
    path: "deal-splits/2026-03/batch/upsert",
    body: parsed,
    model: HubSpotSDK::Crm::BatchResponseDealToDealSplits,
    options: options
  )
end