Class: HubSpotSDK::Resources::WebhooksJournal::Journal::Batch

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



146
147
148
# File 'lib/hubspot_sdk/resources/webhooks_journal/journal/batch.rb', line 146

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::Journal::BatchGetParams for more details.

Execute a batch read operation on the webhooks journal for the specified date, 2026-03. This endpoint allows you to retrieve multiple entries from the webhooks journal in a single request, which can be useful for processing large amounts of data efficiently. Ensure that the request body is provided in the required format.

Parameters:

  • inputs (Array<String>)

    Body param: Strings to input.

  • install_portal_id (Integer)

    Query param: An integer representing the ID of the portal installation for which

  • 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/batch.rb', line 28

def get(params)
  query_params = [:install_portal_id]
  parsed, options = HubSpotSDK::WebhooksJournal::Journal::BatchGetParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed.slice(*query_params))
  @client.request(
    method: :post,
    path: "webhooks-journal/journal/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::Journal::BatchGetEarliestParams for more details.

Retrieve the earliest batch of webhook journal entries for a specified count. This endpoint is useful for accessing historical webhook data in batches, allowing you to process or analyze older entries. The number of entries retrieved is determined by the count parameter.

Parameters:

  • count (Integer)

    The number of earliest journal entries to retrieve. This must be an integer with

  • install_portal_id (Integer)

    The ID of the portal installation. This is an integer value that specifies which

  • 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/batch.rb', line 62

def get_earliest(count, params = {})
  parsed, options = HubSpotSDK::WebhooksJournal::Journal::BatchGetEarliestParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: ["webhooks-journal/journal/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::Journal::BatchGetFromOffsetParams for more details.

Retrieve a batch of webhook journal entries starting from a specified offset. This endpoint allows you to fetch a defined number of entries, which can be useful for processing large datasets in manageable chunks.

Parameters:

  • count (Integer)

    Path param: The number of journal entries to retrieve. This must be an integer w

  • offset (String)

    Path param: The starting point for fetching the journal entries. This is a strin

  • install_portal_id (Integer)

    Query param: The ID of the portal installation. This is an integer value.

  • 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
# File 'lib/hubspot_sdk/resources/webhooks_journal/journal/batch.rb', line 95

def get_from_offset(count, params)
  parsed, options = HubSpotSDK::WebhooksJournal::Journal::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/2026-03/batch/%1$s/next/%2$s", offset, count],
    query: query.transform_keys(install_portal_id: "installPortalId"),
    model: HubSpotSDK::BatchResponseJournalFetchResponse,
    options: options
  )
end

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

Some parameter documentations has been truncated, see Models::WebhooksJournal::Journal::BatchGetLatestParams for more details.

Retrieve the latest batch of webhook journal entries up to the specified count. This endpoint is useful for fetching recent webhook data for analysis or processing. The count parameter determines the maximum number of entries to return.

Parameters:

  • count (Integer)

    The maximum number of journal entries to retrieve. This is a required integer pa

  • install_portal_id (Integer)

    The ID of the portal installation. This is an integer value used to specify the

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

Returns:

See Also:



131
132
133
134
135
136
137
138
139
140
141
# File 'lib/hubspot_sdk/resources/webhooks_journal/journal/batch.rb', line 131

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