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::Webhooks::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::Webhooks::SubscriptionResponse1
Create a new webhook subscription for the specified portal in the HubSpot account.
-
#create_subscription_filter(filter:, subscription_id:, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::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
Delete a specific webhook journal subscription using its unique identifier.
-
#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
Delete a specific filter associated with a webhook journal subscription.
-
#get_earliest_journal_batch(count, install_portal_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::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::Webhooks::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::Webhooks::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::Webhooks::BatchResponseJournalFetchResponse
Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetJournalBatchFromOffsetParams for more details.
-
#get_journal_status(status_id, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::SnapshotStatusResponse
Retrieve the status of a specific webhook journal entry using its status ID.
-
#get_journal_subscription(subscription_id, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::SubscriptionResponse1
Retrieve details of a specific webhook subscription using its unique identifier.
-
#get_latest_journal_batch(count, install_portal_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::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::Webhooks::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::Webhooks::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::Webhooks::BatchResponseJournalFetchResponse
Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetLocalJournalBatchFromOffsetParams for more details.
-
#get_local_journal_status(status_id, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::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::Webhooks::FilterResponse
Retrieve details of a specific filter associated with a webhook subscription in the HubSpot account.
-
#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::Webhooks::CollectionResponseSubscriptionResponseNoPaging
Retrieve a list of webhook journal subscriptions for the specified API version.
-
#list_subscription_filters(subscription_id, request_options: {}) ⇒ Array<HubSpotSDK::Models::Webhooks::FilterResponse>
Retrieve the filters associated with a specific webhook subscription in the HubSpot account.
-
#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.
990 991 992 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 990 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::Webhooks::CrmObjectSnapshotBatchResponse
Some parameter documentations has been truncated, see Models::Webhooks::WebhookCreateCrmSnapshotsParams for more details.
Create a batch of CRM object snapshots for the specified portal. This endpoint allows you to capture the state of CRM objects at a specific point in time, which can be useful for auditing or historical analysis. The request requires a list of CRM object snapshot requests, each specifying the portal ID, object ID, object type ID, and properties to include in the snapshot.
53 54 55 56 57 58 59 60 61 62 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 53 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::Webhooks::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.
89 90 91 92 93 94 95 96 97 98 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 89 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::Webhooks::SubscriptionResponse1
Create a new webhook subscription for the specified portal in the HubSpot account. This endpoint allows you to define the subscription details, including the types of events you want to subscribe to. The request body must include the necessary subscription information as defined by the SubscriptionUpsertRequest schema.
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::Webhooks::SubscriptionResponse1, options: ) end |
#create_subscription_filter(filter:, subscription_id:, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::FilterCreateResponse
Some parameter documentations has been truncated, see Models::Webhooks::WebhookCreateSubscriptionFilterParams for more details.
Create a new filter for a webhook subscription in your HubSpot account. This endpoint allows you to define specific conditions that a webhook event must meet to trigger the subscription. It is useful for managing and customizing the behavior of webhook subscriptions based on specific criteria.
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::Webhooks::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
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 or relevant.
196 197 198 199 200 201 202 203 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 196 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, and no content is returned upon successful deletion.
222 223 224 225 226 227 228 229 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 222 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.
243 244 245 246 247 248 249 250 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 243 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
Delete a specific filter associated with a webhook journal subscription. This operation is useful for managing and cleaning up filters that are no longer needed in your subscription setup. The endpoint requires the unique identifier of the filter to be deleted.
266 267 268 269 270 271 272 273 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 266 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::Webhooks::BatchResponseJournalFetchResponse
Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetEarliestJournalBatchParams for more details.
Retrieve the earliest batch of webhook journal entries up to the specified count. This endpoint is useful for fetching historical webhook data in batches, allowing you to process or analyze the earliest entries first.
294 295 296 297 298 299 300 301 302 303 304 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 294 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::Webhooks::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 version. This endpoint is useful for accessing the oldest records available in the journal, which can be helpful for auditing or historical data analysis.
323 324 325 326 327 328 329 330 331 332 333 334 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 323 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::Webhooks::BatchResponseJournalFetchResponse
Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetEarliestLocalJournalBatchParams for more details.
Retrieve the earliest batch of webhook journal entries based on the specified count. This endpoint is useful for fetching a specific number of the earliest entries in the webhook journal for analysis or processing.
355 356 357 358 359 360 361 362 363 364 365 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 355 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::Webhooks::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 entry from the webhooks journal for the specified portal. This endpoint is useful for accessing the oldest records in the journal, which can be helpful for auditing or tracking purposes.
384 385 386 387 388 389 390 391 392 393 394 395 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 384 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.
410 411 412 413 414 415 416 417 418 419 420 421 422 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 410 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::Webhooks::BatchResponseJournalFetchResponse
Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetJournalBatchByRequestParams for more details.
Perform a batch read operation on the webhooks journal for the specified date. 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.
444 445 446 447 448 449 450 451 452 453 454 455 456 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 444 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::Webhooks::BatchResponseJournalFetchResponse, options: ) end |
#get_journal_batch_from_offset(count, offset:, install_portal_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::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 specified number of entries, making it useful for paginating through large sets of webhook journal data.
479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 479 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::Webhooks::BatchResponseJournalFetchResponse, options: ) end |
#get_journal_status(status_id, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::SnapshotStatusResponse
Retrieve the status of a specific webhook journal entry using its status ID. This endpoint is useful for checking the current state of a webhook process, such as whether it is pending, in progress, completed, failed, or expired.
508 509 510 511 512 513 514 515 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 508 def get_journal_status(status_id, params = {}) @client.request( method: :get, path: ["webhooks-journal/journal/2026-03/status/%1$s", status_id], model: HubSpotSDK::Webhooks::SnapshotStatusResponse, options: params[:request_options] ) end |
#get_journal_subscription(subscription_id, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::SubscriptionResponse1
Retrieve details of a specific webhook subscription using its unique identifier. This endpoint is useful for obtaining information about a particular subscription’s configuration and status within the HubSpot account.
530 531 532 533 534 535 536 537 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 530 def get_journal_subscription(subscription_id, params = {}) @client.request( method: :get, path: ["webhooks-journal/subscriptions/2026-03/%1$s", subscription_id], model: HubSpotSDK::Webhooks::SubscriptionResponse1, options: params[:request_options] ) end |
#get_latest_journal_batch(count, install_portal_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::BatchResponseJournalFetchResponse
Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetLatestJournalBatchParams 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 recent webhook activity within your HubSpot account.
558 559 560 561 562 563 564 565 566 567 568 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 558 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::Webhooks::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 processed by your HubSpot account. It allows you to filter the results by the portal ID to ensure you are retrieving data relevant to a specific installation.
588 589 590 591 592 593 594 595 596 597 598 599 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 588 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::Webhooks::BatchResponseJournalFetchResponse
Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetLatestLocalJournalBatchParams for more details.
Retrieve the latest batch of webhook journal entries. This endpoint is useful for accessing the most recent data entries processed by the webhook journal. It requires specifying the number of entries to retrieve.
620 621 622 623 624 625 626 627 628 629 630 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 620 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::Webhooks::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 you to process or analyze them as needed.
649 650 651 652 653 654 655 656 657 658 659 660 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 649 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::Webhooks::BatchResponseJournalFetchResponse
Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetLocalJournalBatchByRequestParams for more details.
Perform a batch read operation on the webhooks journal. This endpoint allows you to read multiple entries from the journal in a single request. It requires a JSON request body specifying the inputs to be read. The response includes the results of the batch read operation, and may return multiple statuses if there are errors.
683 684 685 686 687 688 689 690 691 692 693 694 695 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 683 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::Webhooks::BatchResponseJournalFetchResponse, options: ) end |
#get_local_journal_batch_from_offset(count, offset:, install_portal_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::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 allows you to fetch a defined number of entries, facilitating the processing of webhook data in manageable chunks.
718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 718 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::Webhooks::BatchResponseJournalFetchResponse, options: ) end |
#get_local_journal_status(status_id, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::SnapshotStatusResponse
Retrieve the status of a specific webhook journal entry using its unique status ID. This endpoint is useful for monitoring the progress or completion of webhook processing tasks.
747 748 749 750 751 752 753 754 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 747 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::Webhooks::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 batch 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 fetching entries from where you last left off.
775 776 777 778 779 780 781 782 783 784 785 786 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 775 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 webhook journal data in a sequential manner, allowing you to fetch entries beyond a given point.
807 808 809 810 811 812 813 814 815 816 817 818 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 807 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.
832 833 834 835 836 837 838 839 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 832 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::Webhooks::FilterResponse
Retrieve details of a specific filter associated with a webhook subscription in the HubSpot account. This endpoint is useful for accessing the configuration and conditions of a filter by its unique identifier.
854 855 856 857 858 859 860 861 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 854 def get_subscription_filter(filter_id, params = {}) @client.request( method: :get, path: ["webhooks-journal/subscriptions/2026-03/filters/%1$s", filter_id], model: HubSpotSDK::Webhooks::FilterResponse, options: params[:request_options] ) end |
#list_event_subscriptions(app_id, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::SubscriptionListResponse
Retrieve event subscriptions for the specified app.
874 875 876 877 878 879 880 881 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 874 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::Webhooks::CollectionResponseSubscriptionResponseNoPaging
Retrieve a list of webhook journal subscriptions for the specified API version. This endpoint provides details about each subscription, including actions, object types, and associated properties. It is useful for managing and reviewing current webhook subscriptions.
895 896 897 898 899 900 901 902 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 895 def list_journal_subscriptions(params = {}) @client.request( method: :get, path: "webhooks-journal/subscriptions/2026-03", model: HubSpotSDK::Webhooks::CollectionResponseSubscriptionResponseNoPaging, options: params[:request_options] ) end |
#list_subscription_filters(subscription_id, request_options: {}) ⇒ Array<HubSpotSDK::Models::Webhooks::FilterResponse>
Retrieve the filters associated with a specific webhook subscription in the HubSpot account. This endpoint is useful for obtaining detailed information about the filters applied to a given subscription, identified by its subscription ID.
918 919 920 921 922 923 924 925 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 918 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::Webhooks::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.
946 947 948 949 950 951 952 953 954 955 956 957 958 959 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 946 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.
976 977 978 979 980 981 982 983 984 985 |
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 976 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 |