Class: HubSpotSDK::Resources::WebhooksJournal::Subscriptions
- Inherits:
-
Object
- Object
- HubSpotSDK::Resources::WebhooksJournal::Subscriptions
- Defined in:
- lib/hubspot_sdk/resources/webhooks_journal/subscriptions.rb,
lib/hubspot_sdk/resources/webhooks_journal/subscriptions/filters.rb
Defined Under Namespace
Classes: Filters
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#create(subscription_upsert_request:, request_options: {}) ⇒ HubSpotSDK::Models::WebhooksJournal::JournalSubscriptionResponse
Create a new subscription in the Webhooks Journal for the specified version.
-
#delete(subscription_id, request_options: {}) ⇒ nil
Some parameter documentations has been truncated, see Models::WebhooksJournal::SubscriptionDeleteParams for more details.
-
#delete_for_portal(portal_id, request_options: {}) ⇒ nil
Some parameter documentations has been truncated, see Models::WebhooksJournal::SubscriptionDeleteForPortalParams for more details.
-
#get(subscription_id, request_options: {}) ⇒ HubSpotSDK::Models::WebhooksJournal::JournalSubscriptionResponse
Retrieve details of a specific webhook subscription using its unique identifier.
-
#initialize(client:) ⇒ Subscriptions
constructor
private
A new instance of Subscriptions.
-
#list(request_options: {}) ⇒ HubSpotSDK::Models::WebhooksJournal::JournalCollectionResponseSubscriptionResponseNoPaging
Retrieve a list of webhook journal subscriptions for the specified version.
Constructor Details
#initialize(client:) ⇒ Subscriptions
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 Subscriptions.
135 136 137 138 |
# File 'lib/hubspot_sdk/resources/webhooks_journal/subscriptions.rb', line 135 def initialize(client:) @client = client @filters = HubSpotSDK::Resources::WebhooksJournal::Subscriptions::Filters.new(client: client) end |
Instance Attribute Details
#filters ⇒ HubSpotSDK::Resources::WebhooksJournal::Subscriptions::Filters (readonly)
8 9 10 |
# File 'lib/hubspot_sdk/resources/webhooks_journal/subscriptions.rb', line 8 def filters @filters end |
Instance Method Details
#create(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.
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/hubspot_sdk/resources/webhooks_journal/subscriptions.rb', line 25 def create(params) parsed, = HubSpotSDK::WebhooksJournal::SubscriptionCreateParams.dump_request(params) @client.request( method: :post, path: "webhooks-journal/subscriptions/2026-03", body: parsed[:subscription_upsert_request], model: HubSpotSDK::WebhooksJournal::JournalSubscriptionResponse, options: ) end |
#delete(subscription_id, request_options: {}) ⇒ nil
Some parameter documentations has been truncated, see Models::WebhooksJournal::SubscriptionDeleteParams 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.
74 75 76 77 78 79 80 81 |
# File 'lib/hubspot_sdk/resources/webhooks_journal/subscriptions.rb', line 74 def delete(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_for_portal(portal_id, request_options: {}) ⇒ nil
Some parameter documentations has been truncated, see Models::WebhooksJournal::SubscriptionDeleteForPortalParams 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.
101 102 103 104 105 106 107 108 |
# File 'lib/hubspot_sdk/resources/webhooks_journal/subscriptions.rb', line 101 def delete_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 |
#get(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.
123 124 125 126 127 128 129 130 |
# File 'lib/hubspot_sdk/resources/webhooks_journal/subscriptions.rb', line 123 def get(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 |
#list(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.
48 49 50 51 52 53 54 55 |
# File 'lib/hubspot_sdk/resources/webhooks_journal/subscriptions.rb', line 48 def list(params = {}) @client.request( method: :get, path: "webhooks-journal/subscriptions/2026-03", model: HubSpotSDK::WebhooksJournal::JournalCollectionResponseSubscriptionResponseNoPaging, options: params[:request_options] ) end |