Class: HubSpotSDK::Resources::WebhooksJournal::JournalLocal::Batch

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



115
116
117
# File 'lib/hubspot_sdk/resources/webhooks_journal/journal_local/batch.rb', line 115

def initialize(client:)
  @client = client
end

Instance Method Details

#get(inputs:, install_portal_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::BatchResponseJournalFetchResponse

Some parameter documentations has been truncated, see Models::WebhooksJournal::JournalLocal::BatchGetParams for more details.

Execute a batch read operation on the webhooks journal. This endpoint allows you to retrieve a batch of webhook journal entries by providing the necessary input data. It is useful for processing multiple records in a single request, streamlining data retrieval tasks.

Parameters:

  • inputs (Array<String>)

    Body param: Strings to input.

  • install_portal_id (Integer)

    Query param: The ID of the portal where the webhooks are installed. This paramet

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

Returns:

See Also:



28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/hubspot_sdk/resources/webhooks_journal/journal_local/batch.rb', line 28

def get(params)
  query_params = [:install_portal_id]
  parsed, options = HubSpotSDK::WebhooksJournal::JournalLocal::BatchGetParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed.slice(*query_params))
  @client.request(
    method: :post,
    path: "webhooks-journal/journal-local/2026-03/batch/read",
    query: query.transform_keys(install_portal_id: "installPortalId"),
    body: parsed.except(*query_params),
    model: HubSpotSDK::BatchResponseJournalFetchResponse,
    options: options
  )
end

#get_earliest(count, install_portal_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::BatchResponseJournalFetchResponse

Some parameter documentations has been truncated, see Models::WebhooksJournal::JournalLocal::BatchGetEarliestParams for more details.

Retrieve the earliest batch of webhook journal entries. This endpoint is useful for accessing the oldest available data in the webhook journal, allowing users to process or analyze historical webhook events. The number of entries to fetch is specified by the ‘count’ path parameter.

Parameters:

  • count (Integer)

    The number of earliest webhook journal entries to retrieve. This is a required i

  • install_portal_id (Integer)

    The ID of the portal installation to filter the webhook journal entries. This is

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

Returns:

See Also:



62
63
64
65
66
67
68
69
70
71
72
# File 'lib/hubspot_sdk/resources/webhooks_journal/journal_local/batch.rb', line 62

def get_earliest(count, params = {})
  parsed, options = HubSpotSDK::WebhooksJournal::JournalLocal::BatchGetEarliestParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: ["webhooks-journal/journal-local/2026-03/batch/earliest/%1$s", count],
    query: query.transform_keys(install_portal_id: "installPortalId"),
    model: HubSpotSDK::BatchResponseJournalFetchResponse,
    options: options
  )
end

#get_from_offset(count, offset:, install_portal_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::BatchResponseJournalFetchResponse

Some parameter documentations has been truncated, see Models::WebhooksJournal::JournalLocal::BatchGetFromOffsetParams for more details.

Retrieve a batch of webhook journal entries starting from a specified offset. This endpoint is useful for paginating through large sets of webhook data. The number of entries returned is determined by the ‘count’ parameter.

Parameters:

  • count (Integer)

    Path param: The number of journal entries to retrieve in this batch. Must be an

  • offset (String)

    Path param: The starting point for the batch retrieval, specified as a string.

  • install_portal_id (Integer)

    Query param: The ID of the portal where the webhooks are installed. This is an o

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

Returns:

See Also:



95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/hubspot_sdk/resources/webhooks_journal/journal_local/batch.rb', line 95

def get_from_offset(count, params)
  parsed, options =
    HubSpotSDK::WebhooksJournal::JournalLocal::BatchGetFromOffsetParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed)
  offset =
    parsed.delete(:offset) do
      raise ArgumentError.new("missing required path argument #{_1}")
    end
  @client.request(
    method: :get,
    path: ["webhooks-journal/journal-local/2026-03/batch/%1$s/next/%2$s", offset, count],
    query: query.transform_keys(install_portal_id: "installPortalId"),
    model: HubSpotSDK::BatchResponseJournalFetchResponse,
    options: options
  )
end