Class: HubSpotSDK::Resources::WebhooksJournal::Journal::Batch
- Inherits:
-
Object
- Object
- HubSpotSDK::Resources::WebhooksJournal::Journal::Batch
- Defined in:
- lib/hubspot_sdk/resources/webhooks_journal/journal/batch.rb
Instance Method Summary collapse
-
#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.
-
#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.
-
#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.
-
#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.
-
#initialize(client:) ⇒ Batch
constructor
private
A new instance of Batch.
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.
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.
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, = 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: ) 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.
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, = 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: ) 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.
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, = 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: ) 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.
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, = 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: ) end |