Class: HubSpotSDK::Resources::Events::Occurrences
- Inherits:
-
Object
- Object
- HubSpotSDK::Resources::Events::Occurrences
- Defined in:
- lib/hubspot_sdk/resources/events/occurrences.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ Occurrences
constructor
private
A new instance of Occurrences.
-
#list(id: nil, after: nil, before: nil, event_type: nil, limit: nil, object_id_: nil, object_property: nil, object_type: nil, occurred_after: nil, occurred_before: nil, properties: nil, property: nil, sort: nil, request_options: {}) ⇒ HubSpotSDK::Internal::Page<HubSpotSDK::Models::Events::ExternalUnifiedEvent>
Some parameter documentations has been truncated, see Models::Events::OccurrenceListParams for more details.
-
#list_event_types(request_options: {}) ⇒ HubSpotSDK::Models::Events::VisibleExternalEventTypeNames
Retrieve a list of event type names.
Constructor Details
#initialize(client:) ⇒ Occurrences
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 Occurrences.
92 93 94 |
# File 'lib/hubspot_sdk/resources/events/occurrences.rb', line 92 def initialize(client:) @client = client end |
Instance Method Details
#list(id: nil, after: nil, before: nil, event_type: nil, limit: nil, object_id_: nil, object_property: nil, object_type: nil, occurred_after: nil, occurred_before: nil, properties: nil, property: nil, sort: nil, request_options: {}) ⇒ HubSpotSDK::Internal::Page<HubSpotSDK::Models::Events::ExternalUnifiedEvent>
Some parameter documentations has been truncated, see Models::Events::OccurrenceListParams for more details.
Retrieve event occurrences for the specified time frame. This endpoint allows filtering by various parameters such as object type, event type, and occurrence time. It supports pagination and sorting of results.
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/hubspot_sdk/resources/events/occurrences.rb', line 47 def list(params = {}) parsed, = HubSpotSDK::Events::OccurrenceListParams.dump_request(params) query = HubSpotSDK::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "events/event-occurrences/2026-03", query: query.transform_keys( event_type: "eventType", object_id_: "objectId", object_property: "objectProperty", object_type: "objectType", occurred_after: "occurredAfter", occurred_before: "occurredBefore" ), page: HubSpotSDK::Internal::Page, model: HubSpotSDK::Events::ExternalUnifiedEvent, options: ) end |
#list_event_types(request_options: {}) ⇒ HubSpotSDK::Models::Events::VisibleExternalEventTypeNames
Retrieve a list of event type names. You may use these event types to query the API for event occurrences of a desired type.
Note: the ‘get_types` method is only supported in the Python SDK version `12.0.0-beta.1` or later.
80 81 82 83 84 85 86 87 |
# File 'lib/hubspot_sdk/resources/events/occurrences.rb', line 80 def list_event_types(params = {}) @client.request( method: :get, path: "events/event-occurrences/2026-03/event-types", model: HubSpotSDK::Events::VisibleExternalEventTypeNames, options: params[:request_options] ) end |