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

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

Defined Under Namespace

Classes: Batch

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Journal

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

Parameters:



98
99
100
101
# File 'lib/hubspot_sdk/resources/webhooks_journal/journal.rb', line 98

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

Instance Attribute Details

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



8
9
10
# File 'lib/hubspot_sdk/resources/webhooks_journal/journal.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::JournalGetEarliestParams for more details.

Retrieve the earliest entry from the webhooks journal for the specified portal. This endpoint is useful for accessing the first recorded webhook event in the journal, which can be helpful for auditing or debugging purposes.

Parameters:

  • install_portal_id (Integer)

    The ID of the portal installation to filter the journal entries by. This is an i

  • 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.rb', line 27

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

Retrieve the next set of entries from the webhooks journal starting from a specified offset. This endpoint is useful for paginating through journal entries to process or analyze webhook events sequentially.

Parameters:

  • offset (String)

    The offset string indicating the starting point for retrieving the next set of j

  • install_portal_id (Integer)

    The ID of the portal where the webhooks are installed. This is an integer value.

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

Returns:

  • (StringIO)

See Also:



59
60
61
62
63
64
65
66
67
68
69
70
# File 'lib/hubspot_sdk/resources/webhooks_journal/journal.rb', line 59

def get_next_from_offset(offset, params = {})
  parsed, options = HubSpotSDK::WebhooksJournal::JournalGetNextFromOffsetParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: ["webhooks-journal/journal/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 provides detailed information about the status, including whether it is pending, in progress, completed, failed, or expired. It is useful for monitoring and managing the state of webhook journal entries.

Parameters:

  • status_id (String)

    The unique identifier (UUID) of the status to retrieve.

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

Returns:

See Also:



86
87
88
89
90
91
92
93
# File 'lib/hubspot_sdk/resources/webhooks_journal/journal.rb', line 86

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