Class: HubSpotSDK::Resources::Crm::DealSplits::Batch
- Inherits:
-
Object
- Object
- HubSpotSDK::Resources::Crm::DealSplits::Batch
- Defined in:
- lib/hubspot_sdk/resources/crm/deal_splits/batch.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ Batch
constructor
private
A new instance of Batch.
-
#read(inputs:, request_options: {}) ⇒ HubSpotSDK::Models::Crm::BatchResponseDealToDealSplits
Read a batch of deal split objects by their associated deal object internal ID.
-
#upsert(inputs:, request_options: {}) ⇒ HubSpotSDK::Models::Crm::BatchResponseDealToDealSplits
Create or replace deal splits for deals with the provided IDs.
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.
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
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, = 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: ) 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
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, = 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: ) end |