Class: ConstantContactClient::EventsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/constant_contact_client/api/events_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ EventsApi

Returns a new instance of EventsApi.



19
20
21
# File 'lib/constant_contact_client/api/events_api.rb', line 19

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/constant_contact_client/api/events_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#check_in_tickets(event_id, check_in_tickets_request, opts = {}) ⇒ nil

Check in event tickets. Use this endpoint to mark one or more tickets as checked in. The event must be in ACTIVE or COMPLETE status. Tickets with CANCELLED status cannot be checked in (returns HTTP 400).

Parameters:

  • event_id (String)

    The ID that uniquely identifies the event.

  • check_in_tickets_request (CheckInTicketsRequest)

    Set of order ticket keys to mark as checked in.

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

    the optional parameters

Returns:

  • (nil)


28
29
30
31
# File 'lib/constant_contact_client/api/events_api.rb', line 28

def check_in_tickets(event_id, check_in_tickets_request, opts = {})
  check_in_tickets_with_http_info(event_id, check_in_tickets_request, opts)
  nil
end

#check_in_tickets_with_http_info(event_id, check_in_tickets_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Check in event tickets. Use this endpoint to mark one or more tickets as checked in. The event must be in `ACTIVE` or `COMPLETE` status. Tickets with `CANCELLED` status cannot be checked in (returns HTTP 400).

Parameters:

  • event_id (String)

    The ID that uniquely identifies the event.

  • check_in_tickets_request (CheckInTicketsRequest)

    Set of order ticket keys to mark as checked in.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



39
40
41
42
43
44
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
# File 'lib/constant_contact_client/api/events_api.rb', line 39

def check_in_tickets_with_http_info(event_id, check_in_tickets_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EventsApi.check_in_tickets ...'
  end
  # verify the required parameter 'event_id' is set
  if @api_client.config.client_side_validation && event_id.nil?
    fail ArgumentError, "Missing the required parameter 'event_id' when calling EventsApi.check_in_tickets"
  end
  # verify the required parameter 'check_in_tickets_request' is set
  if @api_client.config.client_side_validation && check_in_tickets_request.nil?
    fail ArgumentError, "Missing the required parameter 'check_in_tickets_request' when calling EventsApi.check_in_tickets"
  end
  # resource path
  local_var_path = '/events/{event_id}/check_in/tickets'.sub('{' + 'event_id' + '}', CGI.escape(event_id.to_s))

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

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(check_in_tickets_request)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit']

  new_options = opts.merge(
    :operation => :"EventsApi.check_in_tickets",
    :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(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EventsApi#check_in_tickets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#copy_event(event_id, copy_event_request, opts = {}) ⇒ CreateEvent201Response

POST (copy) an existing event. Creates a deep copy of an existing event with all its settings, registration forms, and landing pages. The copied event is created in DRAFT status. Events in DRAFT, ACTIVE, COMPLETE, or CANCELED status can be copied. DELETED events cannot be copied.

Parameters:

  • event_id (String)

    The ID of the event to copy.

  • copy_event_request (CopyEventRequest)

    A JSON request body containing the copy options.

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

    the optional parameters

Returns:



100
101
102
103
# File 'lib/constant_contact_client/api/events_api.rb', line 100

def copy_event(event_id, copy_event_request, opts = {})
  data, _status_code, _headers = copy_event_with_http_info(event_id, copy_event_request, opts)
  data
end

#copy_event_with_http_info(event_id, copy_event_request, opts = {}) ⇒ Array<(CreateEvent201Response, Integer, Hash)>

POST (copy) an existing event. Creates a deep copy of an existing event with all its settings, registration forms, and landing pages. The copied event is created in DRAFT status. Events in DRAFT, ACTIVE, COMPLETE, or CANCELED status can be copied. DELETED events cannot be copied.

Parameters:

  • event_id (String)

    The ID of the event to copy.

  • copy_event_request (CopyEventRequest)

    A JSON request body containing the copy options.

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

    the optional parameters

Returns:

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

    CreateEvent201Response data, response status code and response headers



111
112
113
114
115
116
117
118
119
120
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
# File 'lib/constant_contact_client/api/events_api.rb', line 111

def copy_event_with_http_info(event_id, copy_event_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EventsApi.copy_event ...'
  end
  # verify the required parameter 'event_id' is set
  if @api_client.config.client_side_validation && event_id.nil?
    fail ArgumentError, "Missing the required parameter 'event_id' when calling EventsApi.copy_event"
  end
  # verify the required parameter 'copy_event_request' is set
  if @api_client.config.client_side_validation && copy_event_request.nil?
    fail ArgumentError, "Missing the required parameter 'copy_event_request' when calling EventsApi.copy_event"
  end
  # resource path
  local_var_path = '/events/{event_id}/copy'.sub('{' + 'event_id' + '}', CGI.escape(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'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(copy_event_request)

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit']

  new_options = opts.merge(
    :operation => :"EventsApi.copy_event",
    :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(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EventsApi#copy_event\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_event(opts = {}) ⇒ CreateEvent201Response

POST (create) a new event. Creates a new event with default settings, registration form, and landing page. The event will be created in DRAFT status.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :name (String)

    Name for the new event. If not provided, a default name will be generated.

  • :start_time (String)

    Event start time in ISO 8601 format. If not provided, defaults to a future date.

  • :end_time (String)

    Event end time in ISO 8601 format. If not provided, defaults to one hour after start time.

  • :placeholder_campaign_id (String)

    Placeholder campaign ID for the event.

Returns:



176
177
178
179
# File 'lib/constant_contact_client/api/events_api.rb', line 176

def create_event(opts = {})
  data, _status_code, _headers = create_event_with_http_info(opts)
  data
end

#create_event_with_http_info(opts = {}) ⇒ Array<(CreateEvent201Response, Integer, Hash)>

POST (create) a new event. Creates a new event with default settings, registration form, and landing page. The event will be created in DRAFT status.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :name (String)

    Name for the new event. If not provided, a default name will be generated.

  • :start_time (String)

    Event start time in ISO 8601 format. If not provided, defaults to a future date.

  • :end_time (String)

    Event end time in ISO 8601 format. If not provided, defaults to one hour after start time.

  • :placeholder_campaign_id (String)

    Placeholder campaign ID for the event.

Returns:

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

    CreateEvent201Response data, response status code and response headers



189
190
191
192
193
194
195
196
197
198
199
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
# File 'lib/constant_contact_client/api/events_api.rb', line 189

def create_event_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EventsApi.create_event ...'
  end
  # resource path
  local_var_path = '/events/default'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
  query_params[:'start_time'] = opts[:'start_time'] if !opts[:'start_time'].nil?
  query_params[:'end_time'] = opts[:'end_time'] if !opts[:'end_time'].nil?
  query_params[:'placeholder_campaign_id'] = opts[:'placeholder_campaign_id'] if !opts[:'placeholder_campaign_id'].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] || 'CreateEvent201Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit']

  new_options = opts.merge(
    :operation => :"EventsApi.create_event",
    :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(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EventsApi#create_event\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#find_events(opts = {}) ⇒ FindEvents200Response

GET a collection of events. Retrieve a collection of events with event details.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :event_status (String)

    Use to return only events that meet the specified status. Acceptable values include `ACTIVE`,`DRAFT`, `COMPLETE`, `DELETED`,`CANCELLED`, and `ERROR`.

  • :search_text (String)

    Use to return only events that include the specified text.

  • :sort_by (String)

    Use to sort resulting events by one of the following properties: `name`, `start_time`, `end_time`, `created_time`, or `updated_time`.

  • :sort_order (String)

    Sort order for the `sort_by parameter`. Accepted values include `ASC` (ascending) or `DESC` (descending). Defaults to `ASC` if `sort_by` is provided.

  • :limit (String)

    Limit the number of results to return per page. Default and maximum is `100`.

  • :prev (String)

    Cursor for retrieving the previous page of results. This value is obtained from the `prev_cursor` field in a previous response.

  • :_next (String)

    Cursor for retrieving the next page of results. This value is obtained from the `next_cursor` field in a previous response.

Returns:



248
249
250
251
# File 'lib/constant_contact_client/api/events_api.rb', line 248

def find_events(opts = {})
  data, _status_code, _headers = find_events_with_http_info(opts)
  data
end

#find_events_with_http_info(opts = {}) ⇒ Array<(FindEvents200Response, Integer, Hash)>

GET a collection of events. Retrieve a collection of events with event details.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :event_status (String)

    Use to return only events that meet the specified status. Acceptable values include `ACTIVE`,`DRAFT`, `COMPLETE`, `DELETED`,`CANCELLED`, and `ERROR`.

  • :search_text (String)

    Use to return only events that include the specified text.

  • :sort_by (String)

    Use to sort resulting events by one of the following properties: `name`, `start_time`, `end_time`, `created_time`, or `updated_time`.

  • :sort_order (String)

    Sort order for the `sort_by parameter`. Accepted values include `ASC` (ascending) or `DESC` (descending). Defaults to `ASC` if `sort_by` is provided.

  • :limit (String)

    Limit the number of results to return per page. Default and maximum is `100`.

  • :prev (String)

    Cursor for retrieving the previous page of results. This value is obtained from the `prev_cursor` field in a previous response.

  • :_next (String)

    Cursor for retrieving the next page of results. This value is obtained from the `next_cursor` field in a previous response.

Returns:

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

    FindEvents200Response data, response status code and response headers



264
265
266
267
268
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
# File 'lib/constant_contact_client/api/events_api.rb', line 264

def find_events_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EventsApi.find_events ...'
  end
  # resource path
  local_var_path = '/events'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'event_status'] = opts[:'event_status'] if !opts[:'event_status'].nil?
  query_params[:'search_text'] = opts[:'search_text'] if !opts[:'search_text'].nil?
  query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
  query_params[:'sort_order'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'prev'] = opts[:'prev'] if !opts[:'prev'].nil?
  query_params[:'next'] = opts[:'_next'] if !opts[:'_next'].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] || 'FindEvents200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit']

  new_options = opts.merge(
    :operation => :"EventsApi.find_events",
    :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: EventsApi#find_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#find_registrations_using_get(event_id, track_id, opts = {}) ⇒ FindRegistrationsUsingGET200Response

Get a list of registrations for an event. Use the event_id and track_id path parameters to get a list of registrations for an event. Use optional query parameters to limit the number of results returned per page, the sort order, or to filter results by specific criteria; such as registration status.

Parameters:

  • event_id (String)

    The ID that uniquely identifies the event.

  • track_id (String)

    The track ID that uniquely identifies the event track.

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

    the optional parameters

Options Hash (opts):

  • :registration_status (String)

    Filter registration results by status.

  • :payment_status (String)

    Filter registration results by payment status.

  • :search_text (String)

    Filter registration results by first name, last name, or email address.

  • :sort_by (String)

    Specify the field to use to sort the results.

  • :sort_order (String)

    Use to specify how you want the results sorted.

  • :page_size (String)

    Alternative to the <code>limit</code> parameter to limit the number of results returned per page. If specifying both the <code>limit</code> and <code>page_size</code> query parameters, they must be the same value.

  • :limit (String)

    Limit the number of results returned per page. If specifying both the <code>limit</code> and <code>page_size</code> query parameters, they must be the same value.

  • :prev (String)

    Cursor for pagination used to get the previous page of results (mutually exclusive with <code>next</code>).

  • :_next (String)

    Cursor for pagination used to get the next page of results (mutually exclusive with <code>prev</code>).

Returns:



330
331
332
333
# File 'lib/constant_contact_client/api/events_api.rb', line 330

def find_registrations_using_get(event_id, track_id, opts = {})
  data, _status_code, _headers = find_registrations_using_get_with_http_info(event_id, track_id, opts)
  data
end

#find_registrations_using_get_with_http_info(event_id, track_id, opts = {}) ⇒ Array<(FindRegistrationsUsingGET200Response, Integer, Hash)>

Get a list of registrations for an event. Use the `event_id` and `track_id` path parameters to get a list of registrations for an event. Use optional query parameters to limit the number of results returned per page, the sort order, or to filter results by specific criteria; such as registration `status`.

Parameters:

  • event_id (String)

    The ID that uniquely identifies the event.

  • track_id (String)

    The track ID that uniquely identifies the event track.

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

    the optional parameters

Options Hash (opts):

  • :registration_status (String)

    Filter registration results by status.

  • :payment_status (String)

    Filter registration results by payment status.

  • :search_text (String)

    Filter registration results by first name, last name, or email address.

  • :sort_by (String)

    Specify the field to use to sort the results.

  • :sort_order (String)

    Use to specify how you want the results sorted.

  • :page_size (String)

    Alternative to the <code>limit</code> parameter to limit the number of results returned per page. If specifying both the <code>limit</code> and <code>page_size</code> query parameters, they must be the same value.

  • :limit (String)

    Limit the number of results returned per page. If specifying both the <code>limit</code> and <code>page_size</code> query parameters, they must be the same value.

  • :prev (String)

    Cursor for pagination used to get the previous page of results (mutually exclusive with <code>next</code>).

  • :_next (String)

    Cursor for pagination used to get the next page of results (mutually exclusive with <code>prev</code>).

Returns:



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
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
# File 'lib/constant_contact_client/api/events_api.rb', line 350

def find_registrations_using_get_with_http_info(event_id, track_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EventsApi.find_registrations_using_get ...'
  end
  # verify the required parameter 'event_id' is set
  if @api_client.config.client_side_validation && event_id.nil?
    fail ArgumentError, "Missing the required parameter 'event_id' when calling EventsApi.find_registrations_using_get"
  end
  # verify the required parameter 'track_id' is set
  if @api_client.config.client_side_validation && track_id.nil?
    fail ArgumentError, "Missing the required parameter 'track_id' when calling EventsApi.find_registrations_using_get"
  end
  allowable_values = ["PENDING", "REGISTERED", "CANCELED", "EXPIRED", "IN_PROGRESS, FAILED"]
  if @api_client.config.client_side_validation && opts[:'registration_status'] && !allowable_values.include?(opts[:'registration_status'])
    fail ArgumentError, "invalid value for \"registration_status\", must be one of #{allowable_values}"
  end
  allowable_values = ["PENDING", "PAID", "REFUNDED", "CANCELLED", "FAILED", "CHARGED_BACK"]
  if @api_client.config.client_side_validation && opts[:'payment_status'] && !allowable_values.include?(opts[:'payment_status'])
    fail ArgumentError, "invalid value for \"payment_status\", must be one of #{allowable_values}"
  end
  allowable_values = ["first_name", "last_name", "email_address", "registration_status", "payment_status", "tickets", "total"]
  if @api_client.config.client_side_validation && opts[:'sort_by'] && !allowable_values.include?(opts[:'sort_by'])
    fail ArgumentError, "invalid value for \"sort_by\", must be one of #{allowable_values}"
  end
  allowable_values = ["ASC", "DESC"]
  if @api_client.config.client_side_validation && opts[:'sort_order'] && !allowable_values.include?(opts[:'sort_order'])
    fail ArgumentError, "invalid value for \"sort_order\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/events/{event_id}/tracks/{track_id}/registrations'.sub('{' + 'event_id' + '}', CGI.escape(event_id.to_s)).sub('{' + 'track_id' + '}', CGI.escape(track_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'registration_status'] = opts[:'registration_status'] if !opts[:'registration_status'].nil?
  query_params[:'payment_status'] = opts[:'payment_status'] if !opts[:'payment_status'].nil?
  query_params[:'search_text'] = opts[:'search_text'] if !opts[:'search_text'].nil?
  query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
  query_params[:'sort_order'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'prev'] = opts[:'prev'] if !opts[:'prev'].nil?
  query_params[:'next'] = opts[:'_next'] if !opts[:'_next'].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] || 'FindRegistrationsUsingGET200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit']

  new_options = opts.merge(
    :operation => :"EventsApi.find_registrations_using_get",
    :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: EventsApi#find_registrations_using_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_event2(event_id, opts = {}) ⇒ CreateEvent201Response

GET details for a single event. Specify the event_id path parameter to retrieve the event's details.

Parameters:

  • event_id (String)

    The ID that uniquely identifies the event.

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

    the optional parameters

Options Hash (opts):

  • :include (Boolean)

    Use to include (`true`) or exclude (`false`) event setting properties in the results.

Returns:



433
434
435
436
# File 'lib/constant_contact_client/api/events_api.rb', line 433

def get_event2(event_id, opts = {})
  data, _status_code, _headers = get_event2_with_http_info(event_id, opts)
  data
end

#get_event2_with_http_info(event_id, opts = {}) ⇒ Array<(CreateEvent201Response, Integer, Hash)>

GET details for a single event. Specify the `event_id` path parameter to retrieve the event's details.

Parameters:

  • event_id (String)

    The ID that uniquely identifies the event.

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

    the optional parameters

Options Hash (opts):

  • :include (Boolean)

    Use to include (`true`) or exclude (`false`) event setting properties in the results.

Returns:

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

    CreateEvent201Response data, response status code and response headers



444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
# File 'lib/constant_contact_client/api/events_api.rb', line 444

def get_event2_with_http_info(event_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EventsApi.get_event2 ...'
  end
  # verify the required parameter 'event_id' is set
  if @api_client.config.client_side_validation && event_id.nil?
    fail ArgumentError, "Missing the required parameter 'event_id' when calling EventsApi.get_event2"
  end
  # resource path
  local_var_path = '/events/{event_id}'.sub('{' + 'event_id' + '}', CGI.escape(event_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'include'] = opts[:'include'] if !opts[:'include'].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] || 'CreateEvent201Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit']

  new_options = opts.merge(
    :operation => :"EventsApi.get_event2",
    :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: EventsApi#get_event2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_registration_info(event_id, track_id, registration_id, opts = {}) ⇒ GetRegistrationInfo200Response

Get registration details for an event. Use the event_id, registration_id, and track_id path parameters to get registration details.

Parameters:

  • event_id (String)

    The ID that uniquely identifies the event.

  • track_id (String)

    The track key that uniquely identifies the event track.

  • registration_id (String)

    The ID that uniquely identifies the registration.

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

    the optional parameters

Returns:



500
501
502
503
# File 'lib/constant_contact_client/api/events_api.rb', line 500

def get_registration_info(event_id, track_id, registration_id, opts = {})
  data, _status_code, _headers = get_registration_info_with_http_info(event_id, track_id, registration_id, opts)
  data
end

#get_registration_info_with_http_info(event_id, track_id, registration_id, opts = {}) ⇒ Array<(GetRegistrationInfo200Response, Integer, Hash)>

Get registration details for an event. Use the `event_id`, `registration_id`, and `track_id` path parameters to get registration details.

Parameters:

  • event_id (String)

    The ID that uniquely identifies the event.

  • track_id (String)

    The track key that uniquely identifies the event track.

  • registration_id (String)

    The ID that uniquely identifies the registration.

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

    the optional parameters

Returns:



512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
# File 'lib/constant_contact_client/api/events_api.rb', line 512

def get_registration_info_with_http_info(event_id, track_id, registration_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EventsApi.get_registration_info ...'
  end
  # verify the required parameter 'event_id' is set
  if @api_client.config.client_side_validation && event_id.nil?
    fail ArgumentError, "Missing the required parameter 'event_id' when calling EventsApi.get_registration_info"
  end
  # verify the required parameter 'track_id' is set
  if @api_client.config.client_side_validation && track_id.nil?
    fail ArgumentError, "Missing the required parameter 'track_id' when calling EventsApi.get_registration_info"
  end
  # verify the required parameter 'registration_id' is set
  if @api_client.config.client_side_validation && registration_id.nil?
    fail ArgumentError, "Missing the required parameter 'registration_id' when calling EventsApi.get_registration_info"
  end
  # resource path
  local_var_path = '/events/{event_id}/tracks/{track_id}/registrations/{registration_id}'.sub('{' + 'event_id' + '}', CGI.escape(event_id.to_s)).sub('{' + 'track_id' + '}', CGI.escape(track_id.to_s)).sub('{' + 'registration_id' + '}', CGI.escape(registration_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] || 'GetRegistrationInfo200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit']

  new_options = opts.merge(
    :operation => :"EventsApi.get_registration_info",
    :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: EventsApi#get_registration_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#undo_check_in_tickets(event_id, check_in_tickets_request, opts = {}) ⇒ nil

Undo event ticket check-in. Use this endpoint to undo check-in for one or more tickets, marking them as not checked in. The event must be in ACTIVE or COMPLETE status.

Parameters:

  • event_id (String)

    The ID that uniquely identifies the event.

  • check_in_tickets_request (CheckInTicketsRequest)

    Set of order ticket keys to mark as not checked in.

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

    the optional parameters

Returns:

  • (nil)


574
575
576
577
# File 'lib/constant_contact_client/api/events_api.rb', line 574

def undo_check_in_tickets(event_id, check_in_tickets_request, opts = {})
  undo_check_in_tickets_with_http_info(event_id, check_in_tickets_request, opts)
  nil
end

#undo_check_in_tickets_with_http_info(event_id, check_in_tickets_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Undo event ticket check-in. Use this endpoint to undo check-in for one or more tickets, marking them as not checked in. The event must be in `ACTIVE` or `COMPLETE` status.

Parameters:

  • event_id (String)

    The ID that uniquely identifies the event.

  • check_in_tickets_request (CheckInTicketsRequest)

    Set of order ticket keys to mark as not checked in.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
# File 'lib/constant_contact_client/api/events_api.rb', line 585

def undo_check_in_tickets_with_http_info(event_id, check_in_tickets_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EventsApi.undo_check_in_tickets ...'
  end
  # verify the required parameter 'event_id' is set
  if @api_client.config.client_side_validation && event_id.nil?
    fail ArgumentError, "Missing the required parameter 'event_id' when calling EventsApi.undo_check_in_tickets"
  end
  # verify the required parameter 'check_in_tickets_request' is set
  if @api_client.config.client_side_validation && check_in_tickets_request.nil?
    fail ArgumentError, "Missing the required parameter 'check_in_tickets_request' when calling EventsApi.undo_check_in_tickets"
  end
  # resource path
  local_var_path = '/events/{event_id}/undo_check_in/tickets'.sub('{' + 'event_id' + '}', CGI.escape(event_id.to_s))

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

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(check_in_tickets_request)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit']

  new_options = opts.merge(
    :operation => :"EventsApi.undo_check_in_tickets",
    :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(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EventsApi#undo_check_in_tickets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_event(event_id, create_event201_response, opts = {}) ⇒ nil

PATCH (update) an event. Partially updates an event with the provided fields. Only the specified fields will be updated. This endpoint only works for events in DRAFT or ACTIVE status. Events in COMPLETE, CANCELED, or DELETED status cannot be updated.

Parameters:

  • event_id (String)

    The ID that uniquely identifies the event to update.

  • create_event201_response (CreateEvent201Response)

    A JSON request body containing the event fields to update.

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

    the optional parameters

Returns:

  • (nil)


646
647
648
649
# File 'lib/constant_contact_client/api/events_api.rb', line 646

def update_event(event_id, create_event201_response, opts = {})
  update_event_with_http_info(event_id, create_event201_response, opts)
  nil
end

#update_event_with_http_info(event_id, create_event201_response, opts = {}) ⇒ Array<(nil, Integer, Hash)>

PATCH (update) an event. Partially updates an event with the provided fields. Only the specified fields will be updated. This endpoint only works for events in DRAFT or ACTIVE status. Events in COMPLETE, CANCELED, or DELETED status cannot be updated.

Parameters:

  • event_id (String)

    The ID that uniquely identifies the event to update.

  • create_event201_response (CreateEvent201Response)

    A JSON request body containing the event fields to update.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
# File 'lib/constant_contact_client/api/events_api.rb', line 657

def update_event_with_http_info(event_id, create_event201_response, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EventsApi.update_event ...'
  end
  # verify the required parameter 'event_id' is set
  if @api_client.config.client_side_validation && event_id.nil?
    fail ArgumentError, "Missing the required parameter 'event_id' when calling EventsApi.update_event"
  end
  # verify the required parameter 'create_event201_response' is set
  if @api_client.config.client_side_validation && create_event201_response.nil?
    fail ArgumentError, "Missing the required parameter 'create_event201_response' when calling EventsApi.update_event"
  end
  # resource path
  local_var_path = '/events/{event_id}'.sub('{' + 'event_id' + '}', CGI.escape(event_id.to_s))

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

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(create_event201_response)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit']

  new_options = opts.merge(
    :operation => :"EventsApi.update_event",
    :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(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EventsApi#update_event\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_registration_payment_status_using_put(event_id, track_id, update_registration_payment_status_using_put_request, opts = {}) ⇒ nil

Update payment status for event registrations. Use this endpoint to update the payment status for one or more registrations. This endpoint only processes registrations with a payment method (PAYPAL, WEPAY, STRIPE, DOOR, or CHECK). Free registrations without a payment method are silently excluded.

Parameters:

  • event_id (String)

    The ID that uniquely identifies the event.

  • track_id (String)

    The track key that uniquely identifies the event track.

  • update_registration_payment_status_using_put_request (UpdateRegistrationPaymentStatusUsingPUTRequest)

    Payment status update request data.

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

    the optional parameters

Returns:

  • (nil)


719
720
721
722
# File 'lib/constant_contact_client/api/events_api.rb', line 719

def update_registration_payment_status_using_put(event_id, track_id, update_registration_payment_status_using_put_request, opts = {})
  update_registration_payment_status_using_put_with_http_info(event_id, track_id, update_registration_payment_status_using_put_request, opts)
  nil
end

#update_registration_payment_status_using_put_with_http_info(event_id, track_id, update_registration_payment_status_using_put_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Update payment status for event registrations. Use this endpoint to update the payment status for one or more registrations. This endpoint only processes registrations with a payment method (PAYPAL, WEPAY, STRIPE, DOOR, or CHECK). Free registrations without a payment method are silently excluded.

Parameters:

  • event_id (String)

    The ID that uniquely identifies the event.

  • track_id (String)

    The track key that uniquely identifies the event track.

  • update_registration_payment_status_using_put_request (UpdateRegistrationPaymentStatusUsingPUTRequest)

    Payment status update request data.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
# File 'lib/constant_contact_client/api/events_api.rb', line 731

def update_registration_payment_status_using_put_with_http_info(event_id, track_id, update_registration_payment_status_using_put_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EventsApi.update_registration_payment_status_using_put ...'
  end
  # verify the required parameter 'event_id' is set
  if @api_client.config.client_side_validation && event_id.nil?
    fail ArgumentError, "Missing the required parameter 'event_id' when calling EventsApi.update_registration_payment_status_using_put"
  end
  # verify the required parameter 'track_id' is set
  if @api_client.config.client_side_validation && track_id.nil?
    fail ArgumentError, "Missing the required parameter 'track_id' when calling EventsApi.update_registration_payment_status_using_put"
  end
  # verify the required parameter 'update_registration_payment_status_using_put_request' is set
  if @api_client.config.client_side_validation && update_registration_payment_status_using_put_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_registration_payment_status_using_put_request' when calling EventsApi.update_registration_payment_status_using_put"
  end
  # resource path
  local_var_path = '/events/{event_id}/tracks/{track_id}/registrations/payment_status'.sub('{' + 'event_id' + '}', CGI.escape(event_id.to_s)).sub('{' + 'track_id' + '}', CGI.escape(track_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'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(update_registration_payment_status_using_put_request)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit']

  new_options = opts.merge(
    :operation => :"EventsApi.update_registration_payment_status_using_put",
    :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(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EventsApi#update_registration_payment_status_using_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_registration_status_using_put(event_id, track_id, update_registration_status_using_put_request, opts = {}) ⇒ nil

Update status for event registrations. Use this endpoint to update the registration status for one or more registrations within an event track.

Parameters:

  • event_id (String)

    The ID that uniquely identifies the event.

  • track_id (String)

    The track key that uniquely identifies the event track.

  • update_registration_status_using_put_request (UpdateRegistrationStatusUsingPUTRequest)

    Registration status update request data.

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

    the optional parameters

Options Hash (opts):

  • :increase_count (Boolean)

    Override count flag.

  • :increase_item_count (Boolean)

    Override item count flag.

  • :return_items_to_inventory (Boolean)

    Return items to inventory flag. Defaults to `true`.

Returns:

  • (nil)


802
803
804
805
# File 'lib/constant_contact_client/api/events_api.rb', line 802

def update_registration_status_using_put(event_id, track_id, update_registration_status_using_put_request, opts = {})
  update_registration_status_using_put_with_http_info(event_id, track_id, update_registration_status_using_put_request, opts)
  nil
end

#update_registration_status_using_put_with_http_info(event_id, track_id, update_registration_status_using_put_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Update status for event registrations. Use this endpoint to update the registration status for one or more registrations within an event track.

Parameters:

  • event_id (String)

    The ID that uniquely identifies the event.

  • track_id (String)

    The track key that uniquely identifies the event track.

  • update_registration_status_using_put_request (UpdateRegistrationStatusUsingPUTRequest)

    Registration status update request data.

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

    the optional parameters

Options Hash (opts):

  • :increase_count (Boolean)

    Override count flag.

  • :increase_item_count (Boolean)

    Override item count flag.

  • :return_items_to_inventory (Boolean)

    Return items to inventory flag. Defaults to `true`.

Returns:

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

    nil, response status code and response headers



817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
# File 'lib/constant_contact_client/api/events_api.rb', line 817

def update_registration_status_using_put_with_http_info(event_id, track_id, update_registration_status_using_put_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EventsApi.update_registration_status_using_put ...'
  end
  # verify the required parameter 'event_id' is set
  if @api_client.config.client_side_validation && event_id.nil?
    fail ArgumentError, "Missing the required parameter 'event_id' when calling EventsApi.update_registration_status_using_put"
  end
  # verify the required parameter 'track_id' is set
  if @api_client.config.client_side_validation && track_id.nil?
    fail ArgumentError, "Missing the required parameter 'track_id' when calling EventsApi.update_registration_status_using_put"
  end
  # verify the required parameter 'update_registration_status_using_put_request' is set
  if @api_client.config.client_side_validation && update_registration_status_using_put_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_registration_status_using_put_request' when calling EventsApi.update_registration_status_using_put"
  end
  # resource path
  local_var_path = '/events/{event_id}/tracks/{track_id}/registrations'.sub('{' + 'event_id' + '}', CGI.escape(event_id.to_s)).sub('{' + 'track_id' + '}', CGI.escape(track_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'increase_count'] = opts[:'increase_count'] if !opts[:'increase_count'].nil?
  query_params[:'increase_item_count'] = opts[:'increase_item_count'] if !opts[:'increase_item_count'].nil?
  query_params[:'return_items_to_inventory'] = opts[:'return_items_to_inventory'] if !opts[:'return_items_to_inventory'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(update_registration_status_using_put_request)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit']

  new_options = opts.merge(
    :operation => :"EventsApi.update_registration_status_using_put",
    :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(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EventsApi#update_registration_status_using_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end