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

Inherits:
Object
  • Object
show all
Defined in:
lib/hubspot_sdk/resources/webhooks_journal/journal_local.rb,
lib/hubspot_sdk/resources/webhooks_journal/journal_local/batch.rb

Defined Under Namespace

Classes: Batch

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ JournalLocal

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

Parameters:



128
129
130
131
# File 'lib/hubspot_sdk/resources/webhooks_journal/journal_local.rb', line 128

def initialize(client:)
  @client = client
  @batch = HubSpotSDK::Resources::WebhooksJournal::JournalLocal::Batch.new(client: client)
end

Instance Attribute Details

#batchHubSpotSDK::Resources::WebhooksJournal::JournalLocal::Batch (readonly)



8
9
10
# File 'lib/hubspot_sdk/resources/webhooks_journal/journal_local.rb', line 8

def batch
  @batch
end

Instance Method Details

#get_earliest(install_portal_id: nil, request_options: {}) ⇒ StringIO

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

Retrieve the earliest webhook journal entries for the specified portal. This endpoint can be used to access the oldest records available in the webhook journal, which may be useful for auditing or historical analysis.

Parameters:

  • install_portal_id (Integer)

    The ID of the portal for which to retrieve the earliest webhook journal entries.

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

Returns:

  • (StringIO)

See Also:



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

def get_earliest(params = {})
  parsed, options = HubSpotSDK::WebhooksJournal::JournalLocalGetEarliestParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "webhooks-journal/journal-local/2026-03/earliest",
    query: query.transform_keys(install_portal_id: "installPortalId"),
    headers: {"accept" => "*/*"},
    model: StringIO,
    options: options
  )
end

#get_latest(install_portal_id: nil, request_options: {}) ⇒ StringIO

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

Retrieve the latest entries from the webhooks journal for the specified portal. This endpoint is useful for accessing the most recent webhook events and their statuses, allowing you to monitor and debug webhook activity effectively.

Parameters:

  • install_portal_id (Integer)

    The unique identifier of the portal installation for which to retrieve the lates

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

Returns:

  • (StringIO)

See Also:



57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/hubspot_sdk/resources/webhooks_journal/journal_local.rb', line 57

def get_latest(params = {})
  parsed, options = HubSpotSDK::WebhooksJournal::JournalLocalGetLatestParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "webhooks-journal/journal/2026-03/latest",
    query: query.transform_keys(install_portal_id: "installPortalId"),
    headers: {"accept" => "*/*"},
    model: StringIO,
    options: options
  )
end

#get_next_from_offset(offset, install_portal_id: nil, request_options: {}) ⇒ StringIO

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

Retrieve the next set of webhook journal entries starting from a specified offset. This endpoint is useful for paginating through large sets of webhook data, allowing you to continue from where a previous request left off.

Parameters:

  • offset (String)

    The starting point for retrieving the next set of webhook journal entries. This

  • 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:

  • (StringIO)

See Also:



89
90
91
92
93
94
95
96
97
98
99
100
# File 'lib/hubspot_sdk/resources/webhooks_journal/journal_local.rb', line 89

def get_next_from_offset(offset, params = {})
  parsed, options = HubSpotSDK::WebhooksJournal::JournalLocalGetNextFromOffsetParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: ["webhooks-journal/journal-local/2026-03/offset/%1$s/next", offset],
    query: query.transform_keys(install_portal_id: "installPortalId"),
    headers: {"accept" => "*/*"},
    model: StringIO,
    options: options
  )
end

#get_status(status_id, request_options: {}) ⇒ HubSpotSDK::Models::SnapshotStatusResponse

Retrieve the status of a specific webhook journal entry using its unique status ID. This endpoint is useful for monitoring the progress or outcome of webhook journal entries, allowing you to check if an entry is pending, in progress, completed, failed, or expired.

Parameters:

  • status_id (String)

    The unique identifier of the status to retrieve. It should be in UUID format.

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

Returns:

See Also:



116
117
118
119
120
121
122
123
# File 'lib/hubspot_sdk/resources/webhooks_journal/journal_local.rb', line 116

def get_status(status_id, params = {})
  @client.request(
    method: :get,
    path: ["webhooks-journal/journal-local/2026-03/status/%1$s", status_id],
    model: HubSpotSDK::SnapshotStatusResponse,
    options: params[:request_options]
  )
end