Class: HubSpotSDK::Resources::Webhooks
- Inherits:
-
Object
- Object
- HubSpotSDK::Resources::Webhooks
- Defined in:
- lib/hubspot_sdk/resources/webhooks.rb
Instance Method Summary collapse
-
#create_batch_event_subscriptions(app_id, inputs:, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::BatchResponseSubscriptionResponse
Some parameter documentations has been truncated, see Models::Webhooks::WebhookCreateBatchEventSubscriptionsParams for more details.
-
#create_crm_snapshots(snapshot_requests:, request_options: {}) ⇒ HubSpotSDK::Models::CrmObjectSnapshotBatchResponse
Some parameter documentations has been truncated, see Models::Webhooks::WebhookCreateCrmSnapshotsParams for more details.
-
#create_event_subscription(app_id, active:, event_type:, event_type_name: nil, object_type_id: nil, property_name: nil, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::SubscriptionResponse
Some parameter documentations has been truncated, see Models::Webhooks::WebhookCreateEventSubscriptionParams for more details.
-
#create_journal_subscription(subscription_upsert_request:, request_options: {}) ⇒ HubSpotSDK::Models::WebhooksJournal::JournalSubscriptionResponse
Create a new subscription in the Webhooks Journal for the specified version.
-
#create_subscription_filter(filter:, subscription_id:, request_options: {}) ⇒ HubSpotSDK::Models::FilterCreateResponse
Some parameter documentations has been truncated, see Models::Webhooks::WebhookCreateSubscriptionFilterParams for more details.
-
#delete_event_subscription(subscription_id, app_id:, request_options: {}) ⇒ nil
Delete an existing event subscription by ID.
-
#delete_journal_subscription(subscription_id, request_options: {}) ⇒ nil
Some parameter documentations has been truncated, see Models::Webhooks::WebhookDeleteJournalSubscriptionParams for more details.
-
#delete_journal_subscription_for_portal(portal_id, request_options: {}) ⇒ nil
Some parameter documentations has been truncated, see Models::Webhooks::WebhookDeleteJournalSubscriptionForPortalParams for more details.
-
#delete_settings(app_id, request_options: {}) ⇒ nil
Delete the webhook settings for the specified app.
-
#delete_subscription_filter(filter_id, request_options: {}) ⇒ nil
Remove a specific filter from the webhooks journal subscriptions.
-
#get_earliest_journal_batch(count, install_portal_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::BatchResponseJournalFetchResponse
Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetEarliestJournalBatchParams for more details.
-
#get_earliest_journal_entry(install_portal_id: nil, request_options: {}) ⇒ StringIO
Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetEarliestJournalEntryParams for more details.
-
#get_earliest_local_journal_batch(count, install_portal_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::BatchResponseJournalFetchResponse
Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetEarliestLocalJournalBatchParams for more details.
-
#get_earliest_local_journal_entry(install_portal_id: nil, request_options: {}) ⇒ StringIO
Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetEarliestLocalJournalEntryParams for more details.
-
#get_event_subscription(subscription_id, app_id:, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::SubscriptionResponse
Retrieve a specific event subscription by ID.
-
#get_journal_batch_by_request(inputs:, install_portal_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::BatchResponseJournalFetchResponse
Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetJournalBatchByRequestParams for more details.
-
#get_journal_batch_from_offset(count, offset:, install_portal_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::BatchResponseJournalFetchResponse
Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetJournalBatchFromOffsetParams for more details.
-
#get_journal_status(status_id, request_options: {}) ⇒ HubSpotSDK::Models::SnapshotStatusResponse
Retrieve the status of a specific webhook journal entry using its unique status ID.
-
#get_journal_subscription(subscription_id, request_options: {}) ⇒ HubSpotSDK::Models::WebhooksJournal::JournalSubscriptionResponse
Retrieve details of a specific webhook subscription using its unique identifier.
-
#get_latest_journal_batch(count, install_portal_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::BatchResponseJournalFetchResponse
Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetLatestJournalBatchParams for more details.
-
#get_latest_journal_entry(install_portal_id: nil, request_options: {}) ⇒ StringIO
Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetLatestJournalEntryParams for more details.
-
#get_latest_local_journal_batch(count, install_portal_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::BatchResponseJournalFetchResponse
Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetLatestLocalJournalBatchParams for more details.
-
#get_latest_local_journal_entry(install_portal_id: nil, request_options: {}) ⇒ StringIO
Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetLatestLocalJournalEntryParams for more details.
-
#get_local_journal_batch_by_request(inputs:, install_portal_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::BatchResponseJournalFetchResponse
Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetLocalJournalBatchByRequestParams for more details.
-
#get_local_journal_batch_from_offset(count, offset:, install_portal_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::BatchResponseJournalFetchResponse
Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetLocalJournalBatchFromOffsetParams for more details.
-
#get_local_journal_status(status_id, request_options: {}) ⇒ HubSpotSDK::Models::SnapshotStatusResponse
Retrieve the status of a specific webhook journal entry using its unique status ID.
-
#get_next_journal_entries(offset, install_portal_id: nil, request_options: {}) ⇒ StringIO
Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetNextJournalEntriesParams for more details.
-
#get_next_local_journal_entries(offset, install_portal_id: nil, request_options: {}) ⇒ StringIO
Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetNextLocalJournalEntriesParams for more details.
-
#get_settings(app_id, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::SettingsResponse
Retrieve the webhook settings for the specified app, including the webhook’s target URL, throttle configuration, and create/update date.
-
#get_subscription_filter(filter_id, request_options: {}) ⇒ HubSpotSDK::Models::FilterResponse
Retrieve a specific filter associated with a webhook journal subscription.
-
#initialize(client:) ⇒ Webhooks
constructor
private
A new instance of Webhooks.
-
#list_event_subscriptions(app_id, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::SubscriptionListResponse
Retrieve event subscriptions for the specified app.
-
#list_journal_subscriptions(request_options: {}) ⇒ HubSpotSDK::Models::WebhooksJournal::JournalCollectionResponseSubscriptionResponseNoPaging
Retrieve a list of webhook journal subscriptions for the specified version.
-
#list_subscription_filters(subscription_id, request_options: {}) ⇒ Array<HubSpotSDK::Models::FilterResponse>
Some parameter documentations has been truncated, see Models::Webhooks::WebhookListSubscriptionFiltersParams for more details.
-
#update_event_subscription(subscription_id, app_id:, active: nil, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::SubscriptionResponse
Some parameter documentations has been truncated, see Models::Webhooks::WebhookUpdateEventSubscriptionParams for more details.
-
#update_settings(app_id, target_url:, throttling:, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::SettingsResponse
Update webhook settings for the specified app.
Constructor Details
#initialize(client:) ⇒ Webhooks
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 Webhooks.
1003 1004 1005 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 1003 def initialize(client:) @client = client end |
Instance Method Details
#create_batch_event_subscriptions(app_id, inputs:, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::BatchResponseSubscriptionResponse
Some parameter documentations has been truncated, see Models::Webhooks::WebhookCreateBatchEventSubscriptionsParams for more details.
Batch create event subscriptions for the specified app.
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 23 def create_batch_event_subscriptions(app_id, params) parsed, = HubSpotSDK::Webhooks::WebhookCreateBatchEventSubscriptionsParams.dump_request(params) @client.request( method: :post, path: ["webhooks/2026-03/%1$s/subscriptions/batch/update", app_id], body: parsed, model: HubSpotSDK::Webhooks::BatchResponseSubscriptionResponse, options: ) end |
#create_crm_snapshots(snapshot_requests:, request_options: {}) ⇒ HubSpotSDK::Models::CrmObjectSnapshotBatchResponse
Some parameter documentations has been truncated, see Models::Webhooks::WebhookCreateCrmSnapshotsParams for more details.
Create a batch of CRM object snapshots in HubSpot. This endpoint is used to capture the current state of specified CRM objects for later reference or analysis. It requires a JSON payload containing the details of the CRM objects to snapshot. This operation is exempt from daily and ten-secondly rate limits.
52 53 54 55 56 57 58 59 60 61 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 52 def create_crm_snapshots(params) parsed, = HubSpotSDK::Webhooks::WebhookCreateCrmSnapshotsParams.dump_request(params) @client.request( method: :post, path: "webhooks-journal/snapshots/2026-03/crm", body: parsed, model: HubSpotSDK::CrmObjectSnapshotBatchResponse, options: ) end |
#create_event_subscription(app_id, active:, event_type:, event_type_name: nil, object_type_id: nil, property_name: nil, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::SubscriptionResponse
Some parameter documentations has been truncated, see Models::Webhooks::WebhookCreateEventSubscriptionParams for more details.
Create new event subscription for the specified app.
88 89 90 91 92 93 94 95 96 97 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 88 def create_event_subscription(app_id, params) parsed, = HubSpotSDK::Webhooks::WebhookCreateEventSubscriptionParams.dump_request(params) @client.request( method: :post, path: ["webhooks/2026-03/%1$s/subscriptions", app_id], body: parsed, model: HubSpotSDK::Webhooks::SubscriptionResponse, options: ) end |
#create_journal_subscription(subscription_upsert_request:, request_options: {}) ⇒ HubSpotSDK::Models::WebhooksJournal::JournalSubscriptionResponse
Create a new subscription in the Webhooks Journal for the specified version. This endpoint allows you to define the subscription details by providing the necessary information in the request body. It supports various types of subscriptions, including object, association, event, app lifecycle event, list membership, and GDPR privacy deletion. Ensure that all required fields are included in the request to successfully create a subscription.
114 115 116 117 118 119 120 121 122 123 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 114 def create_journal_subscription(params) parsed, = HubSpotSDK::Webhooks::WebhookCreateJournalSubscriptionParams.dump_request(params) @client.request( method: :post, path: "webhooks-journal/subscriptions/2026-03", body: parsed[:subscription_upsert_request], model: HubSpotSDK::WebhooksJournal::JournalSubscriptionResponse, options: ) end |
#create_subscription_filter(filter:, subscription_id:, request_options: {}) ⇒ HubSpotSDK::Models::FilterCreateResponse
Some parameter documentations has been truncated, see Models::Webhooks::WebhookCreateSubscriptionFilterParams for more details.
Create a new filter for a specific webhook subscription in the HubSpot account. This endpoint allows you to define conditions that determine when a webhook should be triggered. The filter is associated with a subscription identified by its ID, and the request must include the filter details.
145 146 147 148 149 150 151 152 153 154 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 145 def create_subscription_filter(params) parsed, = HubSpotSDK::Webhooks::WebhookCreateSubscriptionFilterParams.dump_request(params) @client.request( method: :post, path: "webhooks-journal/subscriptions/2026-03/filters", body: parsed, model: HubSpotSDK::FilterCreateResponse, options: ) end |
#delete_event_subscription(subscription_id, app_id:, request_options: {}) ⇒ nil
Delete an existing event subscription by ID.
169 170 171 172 173 174 175 176 177 178 179 180 181 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 169 def delete_event_subscription(subscription_id, params) parsed, = HubSpotSDK::Webhooks::WebhookDeleteEventSubscriptionParams.dump_request(params) app_id = parsed.delete(:app_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :delete, path: ["webhooks/2026-03/%1$s/subscriptions/%2$s", app_id, subscription_id], model: NilClass, options: ) end |
#delete_journal_subscription(subscription_id, request_options: {}) ⇒ nil
Some parameter documentations has been truncated, see Models::Webhooks::WebhookDeleteJournalSubscriptionParams for more details.
Delete a specific webhook journal subscription using its unique identifier. This operation is useful for managing and cleaning up subscriptions that are no longer needed in your HubSpot account.
200 201 202 203 204 205 206 207 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 200 def delete_journal_subscription(subscription_id, params = {}) @client.request( method: :delete, path: ["webhooks-journal/subscriptions/2026-03/%1$s", subscription_id], model: NilClass, options: params[:request_options] ) end |
#delete_journal_subscription_for_portal(portal_id, request_options: {}) ⇒ nil
Some parameter documentations has been truncated, see Models::Webhooks::WebhookDeleteJournalSubscriptionForPortalParams for more details.
Delete a webhook journal subscription for a specific portal. This operation removes the subscription associated with the given portalId, ensuring that no further webhook events are sent for this portal. Use this endpoint to manage and clean up subscriptions that are no longer needed.
227 228 229 230 231 232 233 234 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 227 def delete_journal_subscription_for_portal(portal_id, params = {}) @client.request( method: :delete, path: ["webhooks-journal/subscriptions/2026-03/portals/%1$s", portal_id], model: NilClass, options: params[:request_options] ) end |
#delete_settings(app_id, request_options: {}) ⇒ nil
Delete the webhook settings for the specified app. Event subscriptions will not be deleted, but will be paused until another webhook is created.
248 249 250 251 252 253 254 255 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 248 def delete_settings(app_id, params = {}) @client.request( method: :delete, path: ["webhooks/2026-03/%1$s/settings", app_id], model: NilClass, options: params[:request_options] ) end |
#delete_subscription_filter(filter_id, request_options: {}) ⇒ nil
Remove a specific filter from the webhooks journal subscriptions. This operation is useful for managing and cleaning up filters that are no longer needed. Once deleted, the filter cannot be recovered.
270 271 272 273 274 275 276 277 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 270 def delete_subscription_filter(filter_id, params = {}) @client.request( method: :delete, path: ["webhooks-journal/subscriptions/2026-03/filters/%1$s", filter_id], model: NilClass, options: params[:request_options] ) end |
#get_earliest_journal_batch(count, install_portal_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::BatchResponseJournalFetchResponse
Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetEarliestJournalBatchParams 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.
299 300 301 302 303 304 305 306 307 308 309 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 299 def get_earliest_journal_batch(count, params = {}) parsed, = HubSpotSDK::Webhooks::WebhookGetEarliestJournalBatchParams.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_earliest_journal_entry(install_portal_id: nil, request_options: {}) ⇒ StringIO
Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetEarliestJournalEntryParams 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.
328 329 330 331 332 333 334 335 336 337 338 339 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 328 def get_earliest_journal_entry(params = {}) parsed, = HubSpotSDK::Webhooks::WebhookGetEarliestJournalEntryParams.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: ) end |
#get_earliest_local_journal_batch(count, install_portal_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::BatchResponseJournalFetchResponse
Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetEarliestLocalJournalBatchParams 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.
361 362 363 364 365 366 367 368 369 370 371 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 361 def get_earliest_local_journal_batch(count, params = {}) parsed, = HubSpotSDK::Webhooks::WebhookGetEarliestLocalJournalBatchParams.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: ) end |
#get_earliest_local_journal_entry(install_portal_id: nil, request_options: {}) ⇒ StringIO
Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetEarliestLocalJournalEntryParams 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.
390 391 392 393 394 395 396 397 398 399 400 401 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 390 def get_earliest_local_journal_entry(params = {}) parsed, = HubSpotSDK::Webhooks::WebhookGetEarliestLocalJournalEntryParams.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: ) end |
#get_event_subscription(subscription_id, app_id:, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::SubscriptionResponse
Retrieve a specific event subscription by ID.
416 417 418 419 420 421 422 423 424 425 426 427 428 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 416 def get_event_subscription(subscription_id, params) parsed, = HubSpotSDK::Webhooks::WebhookGetEventSubscriptionParams.dump_request(params) app_id = parsed.delete(:app_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :get, path: ["webhooks/2026-03/%1$s/subscriptions/%2$s", app_id, subscription_id], model: HubSpotSDK::Webhooks::SubscriptionResponse, options: ) end |
#get_journal_batch_by_request(inputs:, install_portal_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::BatchResponseJournalFetchResponse
Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetJournalBatchByRequestParams 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.
451 452 453 454 455 456 457 458 459 460 461 462 463 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 451 def get_journal_batch_by_request(params) query_params = [:install_portal_id] parsed, = HubSpotSDK::Webhooks::WebhookGetJournalBatchByRequestParams.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_journal_batch_from_offset(count, offset:, install_portal_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::BatchResponseJournalFetchResponse
Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetJournalBatchFromOffsetParams 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.
486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 486 def get_journal_batch_from_offset(count, params) parsed, = HubSpotSDK::Webhooks::WebhookGetJournalBatchFromOffsetParams.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_journal_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.
516 517 518 519 520 521 522 523 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 516 def get_journal_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 |
#get_journal_subscription(subscription_id, request_options: {}) ⇒ HubSpotSDK::Models::WebhooksJournal::JournalSubscriptionResponse
Retrieve details of a specific webhook subscription using its unique identifier. This endpoint is useful for obtaining information about a particular subscription, such as its actions, object type, and associated properties.
538 539 540 541 542 543 544 545 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 538 def get_journal_subscription(subscription_id, params = {}) @client.request( method: :get, path: ["webhooks-journal/subscriptions/2026-03/%1$s", subscription_id], model: HubSpotSDK::WebhooksJournal::JournalSubscriptionResponse, options: params[:request_options] ) end |
#get_latest_journal_batch(count, install_portal_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::BatchResponseJournalFetchResponse
Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetLatestJournalBatchParams 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.
567 568 569 570 571 572 573 574 575 576 577 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 567 def get_latest_journal_batch(count, params = {}) parsed, = HubSpotSDK::Webhooks::WebhookGetLatestJournalBatchParams.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 |
#get_latest_journal_entry(install_portal_id: nil, request_options: {}) ⇒ StringIO
Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetLatestJournalEntryParams 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.
596 597 598 599 600 601 602 603 604 605 606 607 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 596 def get_latest_journal_entry(params = {}) parsed, = HubSpotSDK::Webhooks::WebhookGetLatestJournalEntryParams.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: ) end |
#get_latest_local_journal_batch(count, install_portal_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::BatchResponseJournalFetchResponse
Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetLatestLocalJournalBatchParams for more details.
Retrieve the latest batch of webhook journal entries. This endpoint allows you to specify the number of entries to fetch, providing a way to access the most recent webhook events processed by your HubSpot account.
628 629 630 631 632 633 634 635 636 637 638 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 628 def get_latest_local_journal_batch(count, params = {}) parsed, = HubSpotSDK::Webhooks::WebhookGetLatestLocalJournalBatchParams.dump_request(params) query = HubSpotSDK::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["webhooks-journal/journal-local/2026-03/batch/latest/%1$s", count], query: query.transform_keys(install_portal_id: "installPortalId"), model: HubSpotSDK::BatchResponseJournalFetchResponse, options: ) end |
#get_latest_local_journal_entry(install_portal_id: nil, request_options: {}) ⇒ StringIO
Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetLatestLocalJournalEntryParams 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 that have been logged, allowing for real-time monitoring or debugging of webhook activities.
658 659 660 661 662 663 664 665 666 667 668 669 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 658 def get_latest_local_journal_entry(params = {}) parsed, = HubSpotSDK::Webhooks::WebhookGetLatestLocalJournalEntryParams.dump_request(params) query = HubSpotSDK::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "webhooks-journal/journal-local/2026-03/latest", query: query.transform_keys(install_portal_id: "installPortalId"), headers: {"accept" => "*/*"}, model: StringIO, options: ) end |
#get_local_journal_batch_by_request(inputs:, install_portal_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::BatchResponseJournalFetchResponse
Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetLocalJournalBatchByRequestParams 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.
691 692 693 694 695 696 697 698 699 700 701 702 703 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 691 def get_local_journal_batch_by_request(params) query_params = [:install_portal_id] parsed, = HubSpotSDK::Webhooks::WebhookGetLocalJournalBatchByRequestParams.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: ) end |
#get_local_journal_batch_from_offset(count, offset:, install_portal_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::BatchResponseJournalFetchResponse
Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetLocalJournalBatchFromOffsetParams 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.
726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 726 def get_local_journal_batch_from_offset(count, params) parsed, = HubSpotSDK::Webhooks::WebhookGetLocalJournalBatchFromOffsetParams.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: ) end |
#get_local_journal_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.
756 757 758 759 760 761 762 763 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 756 def get_local_journal_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 |
#get_next_journal_entries(offset, install_portal_id: nil, request_options: {}) ⇒ StringIO
Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetNextJournalEntriesParams 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.
784 785 786 787 788 789 790 791 792 793 794 795 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 784 def get_next_journal_entries(offset, params = {}) parsed, = HubSpotSDK::Webhooks::WebhookGetNextJournalEntriesParams.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: ) end |
#get_next_local_journal_entries(offset, install_portal_id: nil, request_options: {}) ⇒ StringIO
Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetNextLocalJournalEntriesParams 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.
816 817 818 819 820 821 822 823 824 825 826 827 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 816 def get_next_local_journal_entries(offset, params = {}) parsed, = HubSpotSDK::Webhooks::WebhookGetNextLocalJournalEntriesParams.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: ) end |
#get_settings(app_id, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::SettingsResponse
Retrieve the webhook settings for the specified app, including the webhook’s target URL, throttle configuration, and create/update date.
841 842 843 844 845 846 847 848 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 841 def get_settings(app_id, params = {}) @client.request( method: :get, path: ["webhooks/2026-03/%1$s/settings", app_id], model: HubSpotSDK::Webhooks::SettingsResponse, options: params[:request_options] ) end |
#get_subscription_filter(filter_id, request_options: {}) ⇒ HubSpotSDK::Models::FilterResponse
Retrieve a specific filter associated with a webhook journal subscription. This endpoint allows you to access the details of the filter identified by the filterId, which is useful for managing and understanding the conditions applied to webhook events.
864 865 866 867 868 869 870 871 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 864 def get_subscription_filter(filter_id, params = {}) @client.request( method: :get, path: ["webhooks-journal/subscriptions/2026-03/filters/%1$s", filter_id], model: HubSpotSDK::FilterResponse, options: params[:request_options] ) end |
#list_event_subscriptions(app_id, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::SubscriptionListResponse
Retrieve event subscriptions for the specified app.
884 885 886 887 888 889 890 891 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 884 def list_event_subscriptions(app_id, params = {}) @client.request( method: :get, path: ["webhooks/2026-03/%1$s/subscriptions", app_id], model: HubSpotSDK::Webhooks::SubscriptionListResponse, options: params[:request_options] ) end |
#list_journal_subscriptions(request_options: {}) ⇒ HubSpotSDK::Models::WebhooksJournal::JournalCollectionResponseSubscriptionResponseNoPaging
Retrieve a list of webhook journal subscriptions for the specified version. This endpoint allows you to view all active subscriptions without pagination. It is useful for monitoring and managing webhook subscriptions in your HubSpot account.
905 906 907 908 909 910 911 912 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 905 def list_journal_subscriptions(params = {}) @client.request( method: :get, path: "webhooks-journal/subscriptions/2026-03", model: HubSpotSDK::WebhooksJournal::JournalCollectionResponseSubscriptionResponseNoPaging, options: params[:request_options] ) end |
#list_subscription_filters(subscription_id, request_options: {}) ⇒ Array<HubSpotSDK::Models::FilterResponse>
Some parameter documentations has been truncated, see Models::Webhooks::WebhookListSubscriptionFiltersParams for more details.
Retrieve the filters associated with a specific webhook subscription. This endpoint allows you to view the filters applied to a subscription, which can help in managing and understanding the conditions set for webhook events.
931 932 933 934 935 936 937 938 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 931 def list_subscription_filters(subscription_id, params = {}) @client.request( method: :get, path: ["webhooks-journal/subscriptions/2026-03/filters/subscription/%1$s", subscription_id], model: HubSpotSDK::Internal::Type::ArrayOf[HubSpotSDK::FilterResponse], options: params[:request_options] ) end |
#update_event_subscription(subscription_id, app_id:, active: nil, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::SubscriptionResponse
Some parameter documentations has been truncated, see Models::Webhooks::WebhookUpdateEventSubscriptionParams for more details.
Update an existing event subscription by ID.
959 960 961 962 963 964 965 966 967 968 969 970 971 972 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 959 def update_event_subscription(subscription_id, params) parsed, = HubSpotSDK::Webhooks::WebhookUpdateEventSubscriptionParams.dump_request(params) app_id = parsed.delete(:app_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :patch, path: ["webhooks/2026-03/%1$s/subscriptions/%2$s", app_id, subscription_id], body: parsed, model: HubSpotSDK::Webhooks::SubscriptionResponse, options: ) end |
#update_settings(app_id, target_url:, throttling:, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::SettingsResponse
Update webhook settings for the specified app.
989 990 991 992 993 994 995 996 997 998 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 989 def update_settings(app_id, params) parsed, = HubSpotSDK::Webhooks::WebhookUpdateSettingsParams.dump_request(params) @client.request( method: :put, path: ["webhooks/2026-03/%1$s/settings", app_id], body: parsed, model: HubSpotSDK::Webhooks::SettingsResponse, options: ) end |