Class: HubSpotSDK::Resources::Marketing::MarketingEvents::Participations

Inherits:
Object
  • Object
show all
Defined in:
lib/hubspot_sdk/resources/marketing/marketing_events/participations.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Participations

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 Participations.

Parameters:



197
198
199
# File 'lib/hubspot_sdk/resources/marketing/marketing_events/participations.rb', line 197

def initialize(client:)
  @client = client
end

Instance Method Details

#get_by_external_account_and_event_id(external_event_id, external_account_id:, request_options: {}) ⇒ HubSpotSDK::Models::Marketing::AttendanceCounters

Some parameter documentations has been truncated, see Models::Marketing::MarketingEvents::ParticipationGetByExternalAccountAndEventIDParams for more details.

Read Marketing event’s participations counters by externalAccountId and externalEventId pair.

Parameters:

  • external_event_id (String)

    The id of the marketing event in the external event application.

  • external_account_id (String)

    The accountId that is associated with this marketing event in the external event

  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/hubspot_sdk/resources/marketing/marketing_events/participations.rb', line 26

def (external_event_id, params)
  parsed, options =
    HubSpotSDK::Marketing::MarketingEvents::ParticipationGetByExternalAccountAndEventIDParams.dump_request(
      params
    )
   =
    parsed.delete(:external_account_id) do
      raise ArgumentError.new("missing required path argument #{_1}")
    end
  @client.request(
    method: :get,
    path: [
      "marketing/marketing-events/2026-03/participations/%1$s/%2$s",
      ,
      external_event_id
    ],
    model: HubSpotSDK::Marketing::AttendanceCounters,
    options: options
  )
end

#get_by_id(marketing_event_id, request_options: {}) ⇒ HubSpotSDK::Models::Marketing::AttendanceCounters

Read Marketing event’s participations counters by internal identifier marketingEventId.

Parameters:

  • marketing_event_id (Integer)

    The internal id of the marketing event in HubSpot.

  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



59
60
61
62
63
64
65
66
# File 'lib/hubspot_sdk/resources/marketing/marketing_events/participations.rb', line 59

def get_by_id(marketing_event_id, params = {})
  @client.request(
    method: :get,
    path: ["marketing/marketing-events/2026-03/participations/%1$s", marketing_event_id],
    model: HubSpotSDK::Marketing::AttendanceCounters,
    options: params[:request_options]
  )
end

#list_breakdown_by_contact(contact_identifier, after: nil, limit: nil, state: nil, request_options: {}) ⇒ HubSpotSDK::Internal::Page<HubSpotSDK::Models::Marketing::ParticipationBreakdown>

Some parameter documentations has been truncated, see Models::Marketing::MarketingEvents::ParticipationListBreakdownByContactParams for more details.

Read Contact’s participations by identifier - email or internal id.

Parameters:

  • contact_identifier (String)

    The identifier of the Contact. It may be email or internal id.

  • after (String)

    The cursor indicating the position of the last retrieved item.

  • limit (Integer)

    The limit for response size. The default value is 10, the max number is 100

  • state (String)

    The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHO

  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/hubspot_sdk/resources/marketing/marketing_events/participations.rb', line 89

def list_breakdown_by_contact(contact_identifier, params = {})
  parsed, options =
    HubSpotSDK::Marketing::MarketingEvents::ParticipationListBreakdownByContactParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: [
      "marketing/marketing-events/2026-03/participations/contacts/%1$s/breakdown",
      contact_identifier
    ],
    query: query,
    page: HubSpotSDK::Internal::Page,
    model: HubSpotSDK::Marketing::ParticipationBreakdown,
    options: options
  )
end

#list_breakdown_by_external_account_and_event_id(external_event_id, external_account_id:, after: nil, contact_identifier: nil, limit: nil, state: nil, request_options: {}) ⇒ HubSpotSDK::Internal::Page<HubSpotSDK::Models::Marketing::ParticipationBreakdown>

Some parameter documentations has been truncated, see Models::Marketing::MarketingEvents::ParticipationListBreakdownByExternalAccountAndEventIDParams for more details.

Read Marketing event’s participations breakdown with optional filters by externalAccountId and externalEventId pair.

Parameters:

  • external_event_id (String)

    Path param: The id of the marketing event in the external event application.

  • external_account_id (String)

    Path param: The accountId that is associated with this marketing event in the ex

  • after (String)

    Query param: The cursor indicating the position of the last retrieved item.

  • contact_identifier (String)

    Query param: The identifier of the Contact. It may be email or internal id.

  • limit (Integer)

    Query param: The limit for response size. The default value is 10, the max numbe

  • state (String)

    Query param: The participation state value. It may be REGISTERED, CANCELLED, ATT

  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# File 'lib/hubspot_sdk/resources/marketing/marketing_events/participations.rb', line 132

def (external_event_id, params)
  parsed, options =
    HubSpotSDK::Marketing::MarketingEvents::ParticipationListBreakdownByExternalAccountAndEventIDParams.dump_request(
      params
    )
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed)
   =
    parsed.delete(:external_account_id) do
      raise ArgumentError.new("missing required path argument #{_1}")
    end
  @client.request(
    method: :get,
    path: [
      "marketing/marketing-events/2026-03/participations/%1$s/%2$s/breakdown",
      ,
      external_event_id
    ],
    query: query.transform_keys(contact_identifier: "contactIdentifier"),
    page: HubSpotSDK::Internal::Page,
    model: HubSpotSDK::Marketing::ParticipationBreakdown,
    options: options
  )
end

#list_breakdown_by_id(marketing_event_id, after: nil, contact_identifier: nil, limit: nil, state: nil, request_options: {}) ⇒ HubSpotSDK::Internal::Page<HubSpotSDK::Models::Marketing::ParticipationBreakdown>

Some parameter documentations has been truncated, see Models::Marketing::MarketingEvents::ParticipationListBreakdownByIDParams for more details.

Read Marketing event’s participations breakdown with optional filters by internal identifier marketingEventId.

Parameters:

  • marketing_event_id (Integer)

    The internal id of the marketing event in HubSpot.

  • after (String)

    The cursor indicating the position of the last retrieved item.

  • contact_identifier (String)

    The identifier of the Contact. It may be email or internal id.

  • limit (Integer)

    The limit for response size. The default value is 10, the max number is 100

  • state (String)

    The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHO

  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



180
181
182
183
184
185
186
187
188
189
190
191
192
# File 'lib/hubspot_sdk/resources/marketing/marketing_events/participations.rb', line 180

def list_breakdown_by_id(marketing_event_id, params = {})
  parsed, options =
    HubSpotSDK::Marketing::MarketingEvents::ParticipationListBreakdownByIDParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: ["marketing/marketing-events/2026-03/participations/%1$s/breakdown", marketing_event_id],
    query: query.transform_keys(contact_identifier: "contactIdentifier"),
    page: HubSpotSDK::Internal::Page,
    model: HubSpotSDK::Marketing::ParticipationBreakdown,
    options: options
  )
end