Class: HubSpotSDK::Resources::WebhooksJournal::Subscriptions::Filters
- Inherits:
-
Object
- Object
- HubSpotSDK::Resources::WebhooksJournal::Subscriptions::Filters
- Defined in:
- lib/hubspot_sdk/resources/webhooks_journal/subscriptions/filters.rb
Instance Method Summary collapse
-
#create(filter:, subscription_id:, request_options: {}) ⇒ HubSpotSDK::Models::FilterCreateResponse
Some parameter documentations has been truncated, see Models::WebhooksJournal::Subscriptions::FilterCreateParams for more details.
-
#delete(filter_id, request_options: {}) ⇒ nil
Remove a specific filter from the webhooks journal subscriptions.
-
#get(filter_id, request_options: {}) ⇒ HubSpotSDK::Models::FilterResponse
Retrieve a specific filter associated with a webhook journal subscription.
-
#initialize(client:) ⇒ Filters
constructor
private
A new instance of Filters.
-
#list(subscription_id, request_options: {}) ⇒ Array<HubSpotSDK::Models::FilterResponse>
Some parameter documentations has been truncated, see Models::WebhooksJournal::Subscriptions::FilterListParams for more details.
Constructor Details
#initialize(client:) ⇒ Filters
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 Filters.
113 114 115 |
# File 'lib/hubspot_sdk/resources/webhooks_journal/subscriptions/filters.rb', line 113 def initialize(client:) @client = client end |
Instance Method Details
#create(filter:, subscription_id:, request_options: {}) ⇒ HubSpotSDK::Models::FilterCreateResponse
Some parameter documentations has been truncated, see Models::WebhooksJournal::Subscriptions::FilterCreateParams 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.
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/hubspot_sdk/resources/webhooks_journal/subscriptions/filters.rb', line 28 def create(params) parsed, = HubSpotSDK::WebhooksJournal::Subscriptions::FilterCreateParams.dump_request(params) @client.request( method: :post, path: "webhooks-journal/subscriptions/2026-03/filters", body: parsed, model: HubSpotSDK::FilterCreateResponse, options: ) end |
#delete(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.
78 79 80 81 82 83 84 85 |
# File 'lib/hubspot_sdk/resources/webhooks_journal/subscriptions/filters.rb', line 78 def delete(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(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.
101 102 103 104 105 106 107 108 |
# File 'lib/hubspot_sdk/resources/webhooks_journal/subscriptions/filters.rb', line 101 def get(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(subscription_id, request_options: {}) ⇒ Array<HubSpotSDK::Models::FilterResponse>
Some parameter documentations has been truncated, see Models::WebhooksJournal::Subscriptions::FilterListParams 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.
56 57 58 59 60 61 62 63 |
# File 'lib/hubspot_sdk/resources/webhooks_journal/subscriptions/filters.rb', line 56 def list(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 |