Class: Hubspot::Marketing::Events::ParticipantStateApi

Inherits:
Object
  • Object
show all
Defined in:
lib/hubspot/codegen/marketing/events/api/participant_state_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ParticipantStateApi

Returns a new instance of ParticipantStateApi.



21
22
23
# File 'lib/hubspot/codegen/marketing/events/api/participant_state_api.rb', line 21

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



19
20
21
# File 'lib/hubspot/codegen/marketing/events/api/participant_state_api.rb', line 19

def api_client
  @api_client
end

Instance Method Details

#get_participations_breakdown_by_contact_id(contact_identifier, opts = {}) ⇒ CollectionResponseWithTotalParticipationBreakdownForwardPaging

Read participations breakdown by Contact identifier 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.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :state (String)

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

  • :limit (Integer)

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

  • :after (String)

    The cursor indicating the position of the last retrieved item.

Returns:



32
33
34
35
# File 'lib/hubspot/codegen/marketing/events/api/participant_state_api.rb', line 32

def get_participations_breakdown_by_contact_id(contact_identifier, opts = {})
  data, _status_code, _headers = get_participations_breakdown_by_contact_id_with_http_info(contact_identifier, opts)
  data
end

#get_participations_breakdown_by_contact_id_with_http_info(contact_identifier, opts = {}) ⇒ Array<(CollectionResponseWithTotalParticipationBreakdownForwardPaging, Integer, Hash)>

Read participations breakdown by Contact identifier Read Contact&#39;s participations by identifier - email or internal id.

Parameters:

  • contact_identifier (String)

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

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :state (String)

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

  • :limit (Integer)

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

  • :after (String)

    The cursor indicating the position of the last retrieved item.

Returns:



45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/hubspot/codegen/marketing/events/api/participant_state_api.rb', line 45

def get_participations_breakdown_by_contact_id_with_http_info(contact_identifier, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ParticipantStateApi.get_participations_breakdown_by_contact_id ...'
  end
  # verify the required parameter 'contact_identifier' is set
  if @api_client.config.client_side_validation && contact_identifier.nil?
    fail ArgumentError, "Missing the required parameter 'contact_identifier' when calling ParticipantStateApi.get_participations_breakdown_by_contact_id"
  end
  # resource path
  local_var_path = '/marketing/v3/marketing-events/participations/contacts/{contactIdentifier}/breakdown'.sub('{' + 'contactIdentifier' + '}', CGI.escape(contact_identifier.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'state'] = opts[:'state'] if !opts[:'state'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'CollectionResponseWithTotalParticipationBreakdownForwardPaging'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"ParticipantStateApi.get_participations_breakdown_by_contact_id",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ParticipantStateApi#get_participations_breakdown_by_contact_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_participations_breakdown_by_external_event_id(external_account_id, external_event_id, opts = {}) ⇒ CollectionResponseWithTotalParticipationBreakdownForwardPaging

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

Parameters:

  • external_account_id (String)

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

  • external_event_id (String)

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

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :contact_identifier (String)

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

  • :state (String)

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

  • :limit (Integer)

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

  • :after (String)

    The cursor indicating the position of the last retrieved item.

Returns:



106
107
108
109
# File 'lib/hubspot/codegen/marketing/events/api/participant_state_api.rb', line 106

def get_participations_breakdown_by_external_event_id(, external_event_id, opts = {})
  data, _status_code, _headers = get_participations_breakdown_by_external_event_id_with_http_info(, external_event_id, opts)
  data
end

#get_participations_breakdown_by_external_event_id_with_http_info(external_account_id, external_event_id, opts = {}) ⇒ Array<(CollectionResponseWithTotalParticipationBreakdownForwardPaging, Integer, Hash)>

Read participations breakdown by Marketing Event external identifier Read Marketing event&#39;s participations breakdown with optional filters by externalAccountId and externalEventId pair.

Parameters:

  • external_account_id (String)

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

  • external_event_id (String)

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

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :contact_identifier (String)

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

  • :state (String)

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

  • :limit (Integer)

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

  • :after (String)

    The cursor indicating the position of the last retrieved item.

Returns:



121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
# File 'lib/hubspot/codegen/marketing/events/api/participant_state_api.rb', line 121

def get_participations_breakdown_by_external_event_id_with_http_info(, external_event_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ParticipantStateApi.get_participations_breakdown_by_external_event_id ...'
  end
  # verify the required parameter 'external_account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'external_account_id' when calling ParticipantStateApi.get_participations_breakdown_by_external_event_id"
  end
  # verify the required parameter 'external_event_id' is set
  if @api_client.config.client_side_validation && external_event_id.nil?
    fail ArgumentError, "Missing the required parameter 'external_event_id' when calling ParticipantStateApi.get_participations_breakdown_by_external_event_id"
  end
  # resource path
  local_var_path = '/marketing/v3/marketing-events/participations/{externalAccountId}/{externalEventId}/breakdown'.sub('{' + 'externalAccountId' + '}', CGI.escape(.to_s)).sub('{' + 'externalEventId' + '}', CGI.escape(external_event_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'contactIdentifier'] = opts[:'contact_identifier'] if !opts[:'contact_identifier'].nil?
  query_params[:'state'] = opts[:'state'] if !opts[:'state'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'CollectionResponseWithTotalParticipationBreakdownForwardPaging'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"ParticipantStateApi.get_participations_breakdown_by_external_event_id",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ParticipantStateApi#get_participations_breakdown_by_external_event_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_participations_breakdown_by_marketing_event_id(marketing_event_id, opts = {}) ⇒ CollectionResponseWithTotalParticipationBreakdownForwardPaging

Read participations breakdown by Marketing Event internal identifier 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.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :contact_identifier (String)

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

  • :state (String)

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

  • :limit (Integer)

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

  • :after (String)

    The cursor indicating the position of the last retrieved item.

Returns:



186
187
188
189
# File 'lib/hubspot/codegen/marketing/events/api/participant_state_api.rb', line 186

def get_participations_breakdown_by_marketing_event_id(marketing_event_id, opts = {})
  data, _status_code, _headers = get_participations_breakdown_by_marketing_event_id_with_http_info(marketing_event_id, opts)
  data
end

#get_participations_breakdown_by_marketing_event_id_with_http_info(marketing_event_id, opts = {}) ⇒ Array<(CollectionResponseWithTotalParticipationBreakdownForwardPaging, Integer, Hash)>

Read participations breakdown by Marketing Event internal identifier Read Marketing event&#39;s participations breakdown with optional filters by internal identifier marketingEventId.

Parameters:

  • marketing_event_id (Integer)

    The internal id of the marketing event in HubSpot.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :contact_identifier (String)

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

  • :state (String)

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

  • :limit (Integer)

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

  • :after (String)

    The cursor indicating the position of the last retrieved item.

Returns:



200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
# File 'lib/hubspot/codegen/marketing/events/api/participant_state_api.rb', line 200

def get_participations_breakdown_by_marketing_event_id_with_http_info(marketing_event_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ParticipantStateApi.get_participations_breakdown_by_marketing_event_id ...'
  end
  # verify the required parameter 'marketing_event_id' is set
  if @api_client.config.client_side_validation && marketing_event_id.nil?
    fail ArgumentError, "Missing the required parameter 'marketing_event_id' when calling ParticipantStateApi.get_participations_breakdown_by_marketing_event_id"
  end
  # resource path
  local_var_path = '/marketing/v3/marketing-events/participations/{marketingEventId}/breakdown'.sub('{' + 'marketingEventId' + '}', CGI.escape(marketing_event_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'contactIdentifier'] = opts[:'contact_identifier'] if !opts[:'contact_identifier'].nil?
  query_params[:'state'] = opts[:'state'] if !opts[:'state'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'CollectionResponseWithTotalParticipationBreakdownForwardPaging'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"ParticipantStateApi.get_participations_breakdown_by_marketing_event_id",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ParticipantStateApi#get_participations_breakdown_by_marketing_event_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_participations_counters_by_event_external_id(external_account_id, external_event_id, opts = {}) ⇒ AttendanceCounters

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

Parameters:

  • external_account_id (String)

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

  • external_event_id (String)

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

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



258
259
260
261
# File 'lib/hubspot/codegen/marketing/events/api/participant_state_api.rb', line 258

def get_participations_counters_by_event_external_id(, external_event_id, opts = {})
  data, _status_code, _headers = get_participations_counters_by_event_external_id_with_http_info(, external_event_id, opts)
  data
end

#get_participations_counters_by_event_external_id_with_http_info(external_account_id, external_event_id, opts = {}) ⇒ Array<(AttendanceCounters, Integer, Hash)>

Read participations counters by Marketing Event external identifier Read Marketing event&#39;s participations counters by externalAccountId and externalEventId pair.

Parameters:

  • external_account_id (String)

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

  • external_event_id (String)

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

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(AttendanceCounters, Integer, Hash)>)

    AttendanceCounters data, response status code and response headers



269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
# File 'lib/hubspot/codegen/marketing/events/api/participant_state_api.rb', line 269

def get_participations_counters_by_event_external_id_with_http_info(, external_event_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ParticipantStateApi.get_participations_counters_by_event_external_id ...'
  end
  # verify the required parameter 'external_account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'external_account_id' when calling ParticipantStateApi.get_participations_counters_by_event_external_id"
  end
  # verify the required parameter 'external_event_id' is set
  if @api_client.config.client_side_validation && external_event_id.nil?
    fail ArgumentError, "Missing the required parameter 'external_event_id' when calling ParticipantStateApi.get_participations_counters_by_event_external_id"
  end
  # resource path
  local_var_path = '/marketing/v3/marketing-events/participations/{externalAccountId}/{externalEventId}'.sub('{' + 'externalAccountId' + '}', CGI.escape(.to_s)).sub('{' + 'externalEventId' + '}', CGI.escape(external_event_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'AttendanceCounters'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"ParticipantStateApi.get_participations_counters_by_event_external_id",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ParticipantStateApi#get_participations_counters_by_event_external_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_participations_counters_by_marketing_event_id(marketing_event_id, opts = {}) ⇒ AttendanceCounters

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

Parameters:

  • marketing_event_id (Integer)

    The internal id of the marketing event in HubSpot.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



326
327
328
329
# File 'lib/hubspot/codegen/marketing/events/api/participant_state_api.rb', line 326

def get_participations_counters_by_marketing_event_id(marketing_event_id, opts = {})
  data, _status_code, _headers = get_participations_counters_by_marketing_event_id_with_http_info(marketing_event_id, opts)
  data
end

#get_participations_counters_by_marketing_event_id_with_http_info(marketing_event_id, opts = {}) ⇒ Array<(AttendanceCounters, Integer, Hash)>

Read participations counters by Marketing Event internal identifier Read Marketing event&#39;s participations counters by internal identifier marketingEventId.

Parameters:

  • marketing_event_id (Integer)

    The internal id of the marketing event in HubSpot.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(AttendanceCounters, Integer, Hash)>)

    AttendanceCounters data, response status code and response headers



336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
# File 'lib/hubspot/codegen/marketing/events/api/participant_state_api.rb', line 336

def get_participations_counters_by_marketing_event_id_with_http_info(marketing_event_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ParticipantStateApi.get_participations_counters_by_marketing_event_id ...'
  end
  # verify the required parameter 'marketing_event_id' is set
  if @api_client.config.client_side_validation && marketing_event_id.nil?
    fail ArgumentError, "Missing the required parameter 'marketing_event_id' when calling ParticipantStateApi.get_participations_counters_by_marketing_event_id"
  end
  # resource path
  local_var_path = '/marketing/v3/marketing-events/participations/{marketingEventId}'.sub('{' + 'marketingEventId' + '}', CGI.escape(marketing_event_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'AttendanceCounters'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"ParticipantStateApi.get_participations_counters_by_marketing_event_id",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ParticipantStateApi#get_participations_counters_by_marketing_event_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end