Class: Knievel::DefaultApi

Inherits:
Object
  • Object
show all
Defined in:
lib/knievel/api/default_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ DefaultApi

Returns a new instance of DefaultApi.



19
20
21
# File 'lib/knievel/api/default_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/knievel/api/default_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#batch_upsert_ads(project_id, batch_upsert_ads_request, opts = {}) ⇒ BatchUpsertAdsResult

Parameters:

  • project_id (String)
  • batch_upsert_ads_request (BatchUpsertAdsRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



26
27
28
29
# File 'lib/knievel/api/default_api.rb', line 26

def batch_upsert_ads(project_id, batch_upsert_ads_request, opts = {})
  data, _status_code, _headers = batch_upsert_ads_with_http_info(project_id, batch_upsert_ads_request, opts)
  data
end

#batch_upsert_ads_with_http_info(project_id, batch_upsert_ads_request, opts = {}) ⇒ Array<(BatchUpsertAdsResult, Integer, Hash)>

Returns BatchUpsertAdsResult data, response status code and response headers.

Parameters:

  • project_id (String)
  • batch_upsert_ads_request (BatchUpsertAdsRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    BatchUpsertAdsResult data, response status code and response headers



35
36
37
38
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
# File 'lib/knievel/api/default_api.rb', line 35

def batch_upsert_ads_with_http_info(project_id, batch_upsert_ads_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.batch_upsert_ads ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.batch_upsert_ads"
  end
  # verify the required parameter 'batch_upsert_ads_request' is set
  if @api_client.config.client_side_validation && batch_upsert_ads_request.nil?
    fail ArgumentError, "Missing the required parameter 'batch_upsert_ads_request' when calling DefaultApi.batch_upsert_ads"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/ads:batchUpsert'.sub('{project_id}', CGI.escape(project_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; charset=utf-8']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json; charset=utf-8'])
  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(batch_upsert_ads_request)

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

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

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

#batch_upsert_advertisers(project_id, batch_upsert_advertisers_request, opts = {}) ⇒ BatchUpsertAdvertisersResult

‘POST /v1/projects/:project_id/advertisers:batchUpsert` — bulk by `externalId`. Single Postgres transaction; per `API.md` "Write contract" any per-row failure rolls back the whole batch with `details[]` listing every offending row. On success: 200 with the upserted rows in input order.

Parameters:

Returns:



97
98
99
100
# File 'lib/knievel/api/default_api.rb', line 97

def batch_upsert_advertisers(project_id, batch_upsert_advertisers_request, opts = {})
  data, _status_code, _headers = batch_upsert_advertisers_with_http_info(project_id, batch_upsert_advertisers_request, opts)
  data
end

#batch_upsert_advertisers_with_http_info(project_id, batch_upsert_advertisers_request, opts = {}) ⇒ Array<(BatchUpsertAdvertisersResult, Integer, Hash)>

&#x60;POST /v1/projects/:project_id/advertisers:batchUpsert&#x60; — bulk by &#x60;externalId&#x60;. Single Postgres transaction; per &#x60;API.md&#x60; &quot;Write contract&quot; any per-row failure rolls back the whole batch with &#x60;details[]&#x60; listing every offending row. On success: 200 with the upserted rows in input order.

Parameters:

Returns:



107
108
109
110
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
# File 'lib/knievel/api/default_api.rb', line 107

def batch_upsert_advertisers_with_http_info(project_id, batch_upsert_advertisers_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.batch_upsert_advertisers ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.batch_upsert_advertisers"
  end
  # verify the required parameter 'batch_upsert_advertisers_request' is set
  if @api_client.config.client_side_validation && batch_upsert_advertisers_request.nil?
    fail ArgumentError, "Missing the required parameter 'batch_upsert_advertisers_request' when calling DefaultApi.batch_upsert_advertisers"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/advertisers:batchUpsert'.sub('{project_id}', CGI.escape(project_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; charset=utf-8']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json; charset=utf-8'])
  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(batch_upsert_advertisers_request)

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

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

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

#batch_upsert_campaigns(project_id, batch_upsert_campaigns_request, opts = {}) ⇒ BatchUpsertCampaignsResult

Parameters:

  • project_id (String)
  • batch_upsert_campaigns_request (BatchUpsertCampaignsRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



168
169
170
171
# File 'lib/knievel/api/default_api.rb', line 168

def batch_upsert_campaigns(project_id, batch_upsert_campaigns_request, opts = {})
  data, _status_code, _headers = batch_upsert_campaigns_with_http_info(project_id, batch_upsert_campaigns_request, opts)
  data
end

#batch_upsert_campaigns_with_http_info(project_id, batch_upsert_campaigns_request, opts = {}) ⇒ Array<(BatchUpsertCampaignsResult, Integer, Hash)>

Returns BatchUpsertCampaignsResult data, response status code and response headers.

Parameters:

  • project_id (String)
  • batch_upsert_campaigns_request (BatchUpsertCampaignsRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    BatchUpsertCampaignsResult data, response status code and response headers



177
178
179
180
181
182
183
184
185
186
187
188
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
# File 'lib/knievel/api/default_api.rb', line 177

def batch_upsert_campaigns_with_http_info(project_id, batch_upsert_campaigns_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.batch_upsert_campaigns ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.batch_upsert_campaigns"
  end
  # verify the required parameter 'batch_upsert_campaigns_request' is set
  if @api_client.config.client_side_validation && batch_upsert_campaigns_request.nil?
    fail ArgumentError, "Missing the required parameter 'batch_upsert_campaigns_request' when calling DefaultApi.batch_upsert_campaigns"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/campaigns:batchUpsert'.sub('{project_id}', CGI.escape(project_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; charset=utf-8']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json; charset=utf-8'])
  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(batch_upsert_campaigns_request)

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

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

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

#batch_upsert_flights(project_id, batch_upsert_flights_request, opts = {}) ⇒ BatchUpsertFlightsResult

Parameters:

  • project_id (String)
  • batch_upsert_flights_request (BatchUpsertFlightsRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



238
239
240
241
# File 'lib/knievel/api/default_api.rb', line 238

def batch_upsert_flights(project_id, batch_upsert_flights_request, opts = {})
  data, _status_code, _headers = batch_upsert_flights_with_http_info(project_id, batch_upsert_flights_request, opts)
  data
end

#batch_upsert_flights_with_http_info(project_id, batch_upsert_flights_request, opts = {}) ⇒ Array<(BatchUpsertFlightsResult, Integer, Hash)>

Returns BatchUpsertFlightsResult data, response status code and response headers.

Parameters:

  • project_id (String)
  • batch_upsert_flights_request (BatchUpsertFlightsRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    BatchUpsertFlightsResult data, response status code and response headers



247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
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
# File 'lib/knievel/api/default_api.rb', line 247

def batch_upsert_flights_with_http_info(project_id, batch_upsert_flights_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.batch_upsert_flights ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.batch_upsert_flights"
  end
  # verify the required parameter 'batch_upsert_flights_request' is set
  if @api_client.config.client_side_validation && batch_upsert_flights_request.nil?
    fail ArgumentError, "Missing the required parameter 'batch_upsert_flights_request' when calling DefaultApi.batch_upsert_flights"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/flights:batchUpsert'.sub('{project_id}', CGI.escape(project_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; charset=utf-8']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json; charset=utf-8'])
  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(batch_upsert_flights_request)

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

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

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

#batch_upsert_sites(project_id, batch_upsert_sites_request, opts = {}) ⇒ BatchUpsertSitesResult

Parameters:

  • project_id (String)
  • batch_upsert_sites_request (BatchUpsertSitesRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



308
309
310
311
# File 'lib/knievel/api/default_api.rb', line 308

def batch_upsert_sites(project_id, batch_upsert_sites_request, opts = {})
  data, _status_code, _headers = batch_upsert_sites_with_http_info(project_id, batch_upsert_sites_request, opts)
  data
end

#batch_upsert_sites_with_http_info(project_id, batch_upsert_sites_request, opts = {}) ⇒ Array<(BatchUpsertSitesResult, Integer, Hash)>

Returns BatchUpsertSitesResult data, response status code and response headers.

Parameters:

  • project_id (String)
  • batch_upsert_sites_request (BatchUpsertSitesRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    BatchUpsertSitesResult data, response status code and response headers



317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
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
# File 'lib/knievel/api/default_api.rb', line 317

def batch_upsert_sites_with_http_info(project_id, batch_upsert_sites_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.batch_upsert_sites ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.batch_upsert_sites"
  end
  # verify the required parameter 'batch_upsert_sites_request' is set
  if @api_client.config.client_side_validation && batch_upsert_sites_request.nil?
    fail ArgumentError, "Missing the required parameter 'batch_upsert_sites_request' when calling DefaultApi.batch_upsert_sites"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/sites:batchUpsert'.sub('{project_id}', CGI.escape(project_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; charset=utf-8']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json; charset=utf-8'])
  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(batch_upsert_sites_request)

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

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

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

#batch_upsert_zones(project_id, batch_upsert_zones_request, opts = {}) ⇒ BatchUpsertZonesResult

Parameters:

  • project_id (String)
  • batch_upsert_zones_request (BatchUpsertZonesRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



378
379
380
381
# File 'lib/knievel/api/default_api.rb', line 378

def batch_upsert_zones(project_id, batch_upsert_zones_request, opts = {})
  data, _status_code, _headers = batch_upsert_zones_with_http_info(project_id, batch_upsert_zones_request, opts)
  data
end

#batch_upsert_zones_with_http_info(project_id, batch_upsert_zones_request, opts = {}) ⇒ Array<(BatchUpsertZonesResult, Integer, Hash)>

Returns BatchUpsertZonesResult data, response status code and response headers.

Parameters:

  • project_id (String)
  • batch_upsert_zones_request (BatchUpsertZonesRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    BatchUpsertZonesResult data, response status code and response headers



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
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
# File 'lib/knievel/api/default_api.rb', line 387

def batch_upsert_zones_with_http_info(project_id, batch_upsert_zones_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.batch_upsert_zones ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.batch_upsert_zones"
  end
  # verify the required parameter 'batch_upsert_zones_request' is set
  if @api_client.config.client_side_validation && batch_upsert_zones_request.nil?
    fail ArgumentError, "Missing the required parameter 'batch_upsert_zones_request' when calling DefaultApi.batch_upsert_zones"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/zones:batchUpsert'.sub('{project_id}', CGI.escape(project_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; charset=utf-8']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json; charset=utf-8'])
  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(batch_upsert_zones_request)

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

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

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

#create_ad(project_id, create_ad_request, opts = {}) ⇒ Ad

Parameters:

  • project_id (String)
  • create_ad_request (CreateAdRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



448
449
450
451
# File 'lib/knievel/api/default_api.rb', line 448

def create_ad(project_id, create_ad_request, opts = {})
  data, _status_code, _headers = create_ad_with_http_info(project_id, create_ad_request, opts)
  data
end

#create_ad_library_item(org_id, create_ad_library_item_request, opts = {}) ⇒ AdLibraryItem

Parameters:

  • org_id (String)
  • create_ad_library_item_request (CreateAdLibraryItemRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



518
519
520
521
# File 'lib/knievel/api/default_api.rb', line 518

def create_ad_library_item(org_id, create_ad_library_item_request, opts = {})
  data, _status_code, _headers = create_ad_library_item_with_http_info(org_id, create_ad_library_item_request, opts)
  data
end

#create_ad_library_item_with_http_info(org_id, create_ad_library_item_request, opts = {}) ⇒ Array<(AdLibraryItem, Integer, Hash)>

Returns AdLibraryItem data, response status code and response headers.

Parameters:

  • org_id (String)
  • create_ad_library_item_request (CreateAdLibraryItemRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    AdLibraryItem data, response status code and response headers



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
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
# File 'lib/knievel/api/default_api.rb', line 527

def create_ad_library_item_with_http_info(org_id, create_ad_library_item_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.create_ad_library_item ...'
  end
  # verify the required parameter 'org_id' is set
  if @api_client.config.client_side_validation && org_id.nil?
    fail ArgumentError, "Missing the required parameter 'org_id' when calling DefaultApi.create_ad_library_item"
  end
  # verify the required parameter 'create_ad_library_item_request' is set
  if @api_client.config.client_side_validation && create_ad_library_item_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_ad_library_item_request' when calling DefaultApi.create_ad_library_item"
  end
  # resource path
  local_var_path = '/v1/orgs/{org_id}/ad-library/items'.sub('{org_id}', CGI.escape(org_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; charset=utf-8']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json; charset=utf-8'])
  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_ad_library_item_request)

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

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

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

#create_ad_with_http_info(project_id, create_ad_request, opts = {}) ⇒ Array<(Ad, Integer, Hash)>

Returns Ad data, response status code and response headers.

Parameters:

  • project_id (String)
  • create_ad_request (CreateAdRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    Ad data, response status code and response headers



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
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
# File 'lib/knievel/api/default_api.rb', line 457

def create_ad_with_http_info(project_id, create_ad_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.create_ad ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.create_ad"
  end
  # verify the required parameter 'create_ad_request' is set
  if @api_client.config.client_side_validation && create_ad_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_ad_request' when calling DefaultApi.create_ad"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/ads'.sub('{project_id}', CGI.escape(project_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; charset=utf-8']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json; charset=utf-8'])
  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_ad_request)

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

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

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

#create_advertiser(project_id, create_advertiser_request, opts = {}) ⇒ Advertiser

Parameters:

  • project_id (String)
  • create_advertiser_request (CreateAdvertiserRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



588
589
590
591
# File 'lib/knievel/api/default_api.rb', line 588

def create_advertiser(project_id, create_advertiser_request, opts = {})
  data, _status_code, _headers = create_advertiser_with_http_info(project_id, create_advertiser_request, opts)
  data
end

#create_advertiser_with_http_info(project_id, create_advertiser_request, opts = {}) ⇒ Array<(Advertiser, Integer, Hash)>

Returns Advertiser data, response status code and response headers.

Parameters:

  • project_id (String)
  • create_advertiser_request (CreateAdvertiserRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    Advertiser data, response status code and response headers



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
639
640
641
642
643
644
645
646
647
648
649
650
651
652
# File 'lib/knievel/api/default_api.rb', line 597

def create_advertiser_with_http_info(project_id, create_advertiser_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.create_advertiser ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.create_advertiser"
  end
  # verify the required parameter 'create_advertiser_request' is set
  if @api_client.config.client_side_validation && create_advertiser_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_advertiser_request' when calling DefaultApi.create_advertiser"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/advertisers'.sub('{project_id}', CGI.escape(project_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; charset=utf-8']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json; charset=utf-8'])
  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_advertiser_request)

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

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

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

#create_campaign(project_id, create_campaign_request, opts = {}) ⇒ Campaign

Parameters:

  • project_id (String)
  • create_campaign_request (CreateCampaignRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



658
659
660
661
# File 'lib/knievel/api/default_api.rb', line 658

def create_campaign(project_id, create_campaign_request, opts = {})
  data, _status_code, _headers = create_campaign_with_http_info(project_id, create_campaign_request, opts)
  data
end

#create_campaign_with_http_info(project_id, create_campaign_request, opts = {}) ⇒ Array<(Campaign, Integer, Hash)>

Returns Campaign data, response status code and response headers.

Parameters:

  • project_id (String)
  • create_campaign_request (CreateCampaignRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    Campaign data, response status code and response headers



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
711
712
713
714
715
716
717
718
719
720
721
722
# File 'lib/knievel/api/default_api.rb', line 667

def create_campaign_with_http_info(project_id, create_campaign_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.create_campaign ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.create_campaign"
  end
  # verify the required parameter 'create_campaign_request' is set
  if @api_client.config.client_side_validation && create_campaign_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_campaign_request' when calling DefaultApi.create_campaign"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/campaigns'.sub('{project_id}', CGI.escape(project_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; charset=utf-8']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json; charset=utf-8'])
  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_campaign_request)

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

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

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

#create_creative(project_id, create_creative_request, opts = {}) ⇒ Creative

Parameters:

  • project_id (String)
  • create_creative_request (CreateCreativeRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



728
729
730
731
# File 'lib/knievel/api/default_api.rb', line 728

def create_creative(project_id, create_creative_request, opts = {})
  data, _status_code, _headers = create_creative_with_http_info(project_id, create_creative_request, opts)
  data
end

#create_creative_template(project_id, create_creative_template_request, opts = {}) ⇒ CreativeTemplate

Parameters:

Returns:



798
799
800
801
# File 'lib/knievel/api/default_api.rb', line 798

def create_creative_template(project_id, create_creative_template_request, opts = {})
  data, _status_code, _headers = create_creative_template_with_http_info(project_id, create_creative_template_request, opts)
  data
end

#create_creative_template_with_http_info(project_id, create_creative_template_request, opts = {}) ⇒ Array<(CreativeTemplate, Integer, Hash)>

Returns CreativeTemplate data, response status code and response headers.

Parameters:

Returns:

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

    CreativeTemplate data, response status code and response headers



807
808
809
810
811
812
813
814
815
816
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
# File 'lib/knievel/api/default_api.rb', line 807

def create_creative_template_with_http_info(project_id, create_creative_template_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.create_creative_template ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.create_creative_template"
  end
  # verify the required parameter 'create_creative_template_request' is set
  if @api_client.config.client_side_validation && create_creative_template_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_creative_template_request' when calling DefaultApi.create_creative_template"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/creative-templates'.sub('{project_id}', CGI.escape(project_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; charset=utf-8']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json; charset=utf-8'])
  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_creative_template_request)

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

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

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

#create_creative_with_http_info(project_id, create_creative_request, opts = {}) ⇒ Array<(Creative, Integer, Hash)>

Returns Creative data, response status code and response headers.

Parameters:

  • project_id (String)
  • create_creative_request (CreateCreativeRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    Creative data, response status code and response headers



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
791
792
# File 'lib/knievel/api/default_api.rb', line 737

def create_creative_with_http_info(project_id, create_creative_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.create_creative ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.create_creative"
  end
  # verify the required parameter 'create_creative_request' is set
  if @api_client.config.client_side_validation && create_creative_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_creative_request' when calling DefaultApi.create_creative"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/creatives'.sub('{project_id}', CGI.escape(project_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; charset=utf-8']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json; charset=utf-8'])
  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_creative_request)

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

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

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

#create_flight(project_id, create_flight_request, opts = {}) ⇒ Flight

Parameters:

  • project_id (String)
  • create_flight_request (CreateFlightRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



868
869
870
871
# File 'lib/knievel/api/default_api.rb', line 868

def create_flight(project_id, create_flight_request, opts = {})
  data, _status_code, _headers = create_flight_with_http_info(project_id, create_flight_request, opts)
  data
end

#create_flight_with_http_info(project_id, create_flight_request, opts = {}) ⇒ Array<(Flight, Integer, Hash)>

Returns Flight data, response status code and response headers.

Parameters:

  • project_id (String)
  • create_flight_request (CreateFlightRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    Flight data, response status code and response headers



877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
# File 'lib/knievel/api/default_api.rb', line 877

def create_flight_with_http_info(project_id, create_flight_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.create_flight ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.create_flight"
  end
  # verify the required parameter 'create_flight_request' is set
  if @api_client.config.client_side_validation && create_flight_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_flight_request' when calling DefaultApi.create_flight"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/flights'.sub('{project_id}', CGI.escape(project_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; charset=utf-8']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json; charset=utf-8'])
  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_flight_request)

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

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

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

#create_project(org_id, create_project_request, opts = {}) ⇒ ProjectResponse

Create a project under an org. Honors ‘Idempotency-Key` (24 h replay window per `API.md` "Idempotency"); `409 idempotency_conflict` if the same key is reused with a different body. Returns `409 external_id_conflict` if the `externalId` is already taken in this org.

Parameters:

  • org_id (String)
  • create_project_request (CreateProjectRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :idempotency_key (String)

Returns:



940
941
942
943
# File 'lib/knievel/api/default_api.rb', line 940

def create_project(org_id, create_project_request, opts = {})
  data, _status_code, _headers = create_project_with_http_info(org_id, create_project_request, opts)
  data
end

#create_project_with_http_info(org_id, create_project_request, opts = {}) ⇒ Array<(ProjectResponse, Integer, Hash)>

Create a project under an org. Honors &#x60;Idempotency-Key&#x60; (24 h replay window per &#x60;API.md&#x60; &quot;Idempotency&quot;); &#x60;409 idempotency_conflict&#x60; if the same key is reused with a different body. Returns &#x60;409 external_id_conflict&#x60; if the &#x60;externalId&#x60; is already taken in this org.

Parameters:

  • org_id (String)
  • create_project_request (CreateProjectRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :idempotency_key (String)

Returns:

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

    ProjectResponse data, response status code and response headers



951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
# File 'lib/knievel/api/default_api.rb', line 951

def create_project_with_http_info(org_id, create_project_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.create_project ...'
  end
  # verify the required parameter 'org_id' is set
  if @api_client.config.client_side_validation && org_id.nil?
    fail ArgumentError, "Missing the required parameter 'org_id' when calling DefaultApi.create_project"
  end
  # verify the required parameter 'create_project_request' is set
  if @api_client.config.client_side_validation && create_project_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_project_request' when calling DefaultApi.create_project"
  end
  # resource path
  local_var_path = '/v1/orgs/{org_id}/projects'.sub('{org_id}', CGI.escape(org_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; charset=utf-8']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json; charset=utf-8'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end
  header_params['idempotency_key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?

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

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

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

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

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

#create_site(project_id, create_site_request, opts = {}) ⇒ Site

Parameters:

  • project_id (String)
  • create_site_request (CreateSiteRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1013
1014
1015
1016
# File 'lib/knievel/api/default_api.rb', line 1013

def create_site(project_id, create_site_request, opts = {})
  data, _status_code, _headers = create_site_with_http_info(project_id, create_site_request, opts)
  data
end

#create_site_with_http_info(project_id, create_site_request, opts = {}) ⇒ Array<(Site, Integer, Hash)>

Returns Site data, response status code and response headers.

Parameters:

  • project_id (String)
  • create_site_request (CreateSiteRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    Site data, response status code and response headers



1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
# File 'lib/knievel/api/default_api.rb', line 1022

def create_site_with_http_info(project_id, create_site_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.create_site ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.create_site"
  end
  # verify the required parameter 'create_site_request' is set
  if @api_client.config.client_side_validation && create_site_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_site_request' when calling DefaultApi.create_site"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/sites'.sub('{project_id}', CGI.escape(project_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; charset=utf-8']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json; charset=utf-8'])
  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_site_request)

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

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

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

#create_token(org_id, create_token_request, opts = {}) ⇒ CreateTokenResponse

Mint an opaque token. Returns the plaintext secret exactly once. Min role: org-admin.

Parameters:

  • org_id (String)
  • create_token_request (CreateTokenRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1084
1085
1086
1087
# File 'lib/knievel/api/default_api.rb', line 1084

def create_token(org_id, create_token_request, opts = {})
  data, _status_code, _headers = create_token_with_http_info(org_id, create_token_request, opts)
  data
end

#create_token_with_http_info(org_id, create_token_request, opts = {}) ⇒ Array<(CreateTokenResponse, Integer, Hash)>

Mint an opaque token. Returns the plaintext secret exactly once. Min role: org-admin.

Parameters:

  • org_id (String)
  • create_token_request (CreateTokenRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    CreateTokenResponse data, response status code and response headers



1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
# File 'lib/knievel/api/default_api.rb', line 1094

def create_token_with_http_info(org_id, create_token_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.create_token ...'
  end
  # verify the required parameter 'org_id' is set
  if @api_client.config.client_side_validation && org_id.nil?
    fail ArgumentError, "Missing the required parameter 'org_id' when calling DefaultApi.create_token"
  end
  # verify the required parameter 'create_token_request' is set
  if @api_client.config.client_side_validation && create_token_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_token_request' when calling DefaultApi.create_token"
  end
  # resource path
  local_var_path = '/v1/orgs/{org_id}/tokens'.sub('{org_id}', CGI.escape(org_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; charset=utf-8']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json; charset=utf-8'])
  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_token_request)

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

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

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

#create_zone(project_id, create_zone_request, opts = {}) ⇒ Zone

Parameters:

  • project_id (String)
  • create_zone_request (CreateZoneRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1155
1156
1157
1158
# File 'lib/knievel/api/default_api.rb', line 1155

def create_zone(project_id, create_zone_request, opts = {})
  data, _status_code, _headers = create_zone_with_http_info(project_id, create_zone_request, opts)
  data
end

#create_zone_with_http_info(project_id, create_zone_request, opts = {}) ⇒ Array<(Zone, Integer, Hash)>

Returns Zone data, response status code and response headers.

Parameters:

  • project_id (String)
  • create_zone_request (CreateZoneRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    Zone data, response status code and response headers



1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
# File 'lib/knievel/api/default_api.rb', line 1164

def create_zone_with_http_info(project_id, create_zone_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.create_zone ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.create_zone"
  end
  # verify the required parameter 'create_zone_request' is set
  if @api_client.config.client_side_validation && create_zone_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_zone_request' when calling DefaultApi.create_zone"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/zones'.sub('{project_id}', CGI.escape(project_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; charset=utf-8']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json; charset=utf-8'])
  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_zone_request)

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

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

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

#decisions(project_id, decisions_request, opts = {}) ⇒ DecisionsResponse

Parameters:

  • project_id (String)
  • decisions_request (DecisionsRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1225
1226
1227
1228
# File 'lib/knievel/api/default_api.rb', line 1225

def decisions(project_id, decisions_request, opts = {})
  data, _status_code, _headers = decisions_with_http_info(project_id, decisions_request, opts)
  data
end

#decisions_explain(project_id, decisions_request, opts = {}) ⇒ ExplainResponse

Parameters:

  • project_id (String)
  • decisions_request (DecisionsRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1295
1296
1297
1298
# File 'lib/knievel/api/default_api.rb', line 1295

def decisions_explain(project_id, decisions_request, opts = {})
  data, _status_code, _headers = decisions_explain_with_http_info(project_id, decisions_request, opts)
  data
end

#decisions_explain_with_http_info(project_id, decisions_request, opts = {}) ⇒ Array<(ExplainResponse, Integer, Hash)>

Returns ExplainResponse data, response status code and response headers.

Parameters:

  • project_id (String)
  • decisions_request (DecisionsRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    ExplainResponse data, response status code and response headers



1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
# File 'lib/knievel/api/default_api.rb', line 1304

def decisions_explain_with_http_info(project_id, decisions_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.decisions_explain ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.decisions_explain"
  end
  # verify the required parameter 'decisions_request' is set
  if @api_client.config.client_side_validation && decisions_request.nil?
    fail ArgumentError, "Missing the required parameter 'decisions_request' when calling DefaultApi.decisions_explain"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/decisions:explain'.sub('{project_id}', CGI.escape(project_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; charset=utf-8']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json; charset=utf-8'])
  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(decisions_request)

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

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

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

#decisions_with_http_info(project_id, decisions_request, opts = {}) ⇒ Array<(DecisionsResponse, Integer, Hash)>

Returns DecisionsResponse data, response status code and response headers.

Parameters:

  • project_id (String)
  • decisions_request (DecisionsRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    DecisionsResponse data, response status code and response headers



1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
# File 'lib/knievel/api/default_api.rb', line 1234

def decisions_with_http_info(project_id, decisions_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.decisions ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.decisions"
  end
  # verify the required parameter 'decisions_request' is set
  if @api_client.config.client_side_validation && decisions_request.nil?
    fail ArgumentError, "Missing the required parameter 'decisions_request' when calling DefaultApi.decisions"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/decisions'.sub('{project_id}', CGI.escape(project_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; charset=utf-8']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json; charset=utf-8'])
  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(decisions_request)

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

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

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

#get_ad(project_id, id, opts = {}) ⇒ Ad

Parameters:

  • project_id (String)
  • id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1365
1366
1367
1368
# File 'lib/knievel/api/default_api.rb', line 1365

def get_ad(project_id, id, opts = {})
  data, _status_code, _headers = get_ad_with_http_info(project_id, id, opts)
  data
end

#get_ad_library_item(org_id, item_id, opts = {}) ⇒ AdLibraryItem

Parameters:

  • org_id (String)
  • item_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1430
1431
1432
1433
# File 'lib/knievel/api/default_api.rb', line 1430

def get_ad_library_item(org_id, item_id, opts = {})
  data, _status_code, _headers = get_ad_library_item_with_http_info(org_id, item_id, opts)
  data
end

#get_ad_library_item_with_http_info(org_id, item_id, opts = {}) ⇒ Array<(AdLibraryItem, Integer, Hash)>

Returns AdLibraryItem data, response status code and response headers.

Parameters:

  • org_id (String)
  • item_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    AdLibraryItem data, response status code and response headers



1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
# File 'lib/knievel/api/default_api.rb', line 1439

def get_ad_library_item_with_http_info(org_id, item_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.get_ad_library_item ...'
  end
  # verify the required parameter 'org_id' is set
  if @api_client.config.client_side_validation && org_id.nil?
    fail ArgumentError, "Missing the required parameter 'org_id' when calling DefaultApi.get_ad_library_item"
  end
  # verify the required parameter 'item_id' is set
  if @api_client.config.client_side_validation && item_id.nil?
    fail ArgumentError, "Missing the required parameter 'item_id' when calling DefaultApi.get_ad_library_item"
  end
  # resource path
  local_var_path = '/v1/orgs/{org_id}/ad-library/items/{item_id}'.sub('{org_id}', CGI.escape(org_id.to_s)).sub('{item_id}', CGI.escape(item_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; charset=utf-8']) unless header_params['Accept']

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

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

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

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

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

#get_ad_type(project_id, id, opts = {}) ⇒ AdType

Parameters:

  • project_id (String)
  • id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1495
1496
1497
1498
# File 'lib/knievel/api/default_api.rb', line 1495

def get_ad_type(project_id, id, opts = {})
  data, _status_code, _headers = get_ad_type_with_http_info(project_id, id, opts)
  data
end

#get_ad_type_with_http_info(project_id, id, opts = {}) ⇒ Array<(AdType, Integer, Hash)>

Returns AdType data, response status code and response headers.

Parameters:

  • project_id (String)
  • id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    AdType data, response status code and response headers



1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
# File 'lib/knievel/api/default_api.rb', line 1504

def get_ad_type_with_http_info(project_id, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.get_ad_type ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.get_ad_type"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.get_ad_type"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/ad-types/{id}'.sub('{project_id}', CGI.escape(project_id.to_s)).sub('{id}', CGI.escape(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; charset=utf-8']) unless header_params['Accept']

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

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

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

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

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

#get_ad_with_http_info(project_id, id, opts = {}) ⇒ Array<(Ad, Integer, Hash)>

Returns Ad data, response status code and response headers.

Parameters:

  • project_id (String)
  • id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    Ad data, response status code and response headers



1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
# File 'lib/knievel/api/default_api.rb', line 1374

def get_ad_with_http_info(project_id, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.get_ad ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.get_ad"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.get_ad"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/ads/{id}'.sub('{project_id}', CGI.escape(project_id.to_s)).sub('{id}', CGI.escape(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; charset=utf-8']) unless header_params['Accept']

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

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

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

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

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

#get_advertiser(project_id, id, opts = {}) ⇒ Advertiser

Parameters:

  • project_id (String)
  • id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1560
1561
1562
1563
# File 'lib/knievel/api/default_api.rb', line 1560

def get_advertiser(project_id, id, opts = {})
  data, _status_code, _headers = get_advertiser_with_http_info(project_id, id, opts)
  data
end

#get_advertiser_with_http_info(project_id, id, opts = {}) ⇒ Array<(Advertiser, Integer, Hash)>

Returns Advertiser data, response status code and response headers.

Parameters:

  • project_id (String)
  • id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    Advertiser data, response status code and response headers



1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
# File 'lib/knievel/api/default_api.rb', line 1569

def get_advertiser_with_http_info(project_id, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.get_advertiser ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.get_advertiser"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.get_advertiser"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/advertisers/{id}'.sub('{project_id}', CGI.escape(project_id.to_s)).sub('{id}', CGI.escape(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; charset=utf-8']) unless header_params['Accept']

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

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

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

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

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

#get_campaign(project_id, id, opts = {}) ⇒ Campaign

Parameters:

  • project_id (String)
  • id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1625
1626
1627
1628
# File 'lib/knievel/api/default_api.rb', line 1625

def get_campaign(project_id, id, opts = {})
  data, _status_code, _headers = get_campaign_with_http_info(project_id, id, opts)
  data
end

#get_campaign_with_http_info(project_id, id, opts = {}) ⇒ Array<(Campaign, Integer, Hash)>

Returns Campaign data, response status code and response headers.

Parameters:

  • project_id (String)
  • id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    Campaign data, response status code and response headers



1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
# File 'lib/knievel/api/default_api.rb', line 1634

def get_campaign_with_http_info(project_id, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.get_campaign ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.get_campaign"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.get_campaign"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/campaigns/{id}'.sub('{project_id}', CGI.escape(project_id.to_s)).sub('{id}', CGI.escape(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; charset=utf-8']) unless header_params['Accept']

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

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

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

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

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

#get_channel(project_id, id, opts = {}) ⇒ Channel

Parameters:

  • project_id (String)
  • id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1690
1691
1692
1693
# File 'lib/knievel/api/default_api.rb', line 1690

def get_channel(project_id, id, opts = {})
  data, _status_code, _headers = get_channel_with_http_info(project_id, id, opts)
  data
end

#get_channel_with_http_info(project_id, id, opts = {}) ⇒ Array<(Channel, Integer, Hash)>

Returns Channel data, response status code and response headers.

Parameters:

  • project_id (String)
  • id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    Channel data, response status code and response headers



1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
# File 'lib/knievel/api/default_api.rb', line 1699

def get_channel_with_http_info(project_id, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.get_channel ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.get_channel"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.get_channel"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/channels/{id}'.sub('{project_id}', CGI.escape(project_id.to_s)).sub('{id}', CGI.escape(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; charset=utf-8']) unless header_params['Accept']

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

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

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

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

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

#get_creative(project_id, id, opts = {}) ⇒ Creative

Parameters:

  • project_id (String)
  • id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1755
1756
1757
1758
# File 'lib/knievel/api/default_api.rb', line 1755

def get_creative(project_id, id, opts = {})
  data, _status_code, _headers = get_creative_with_http_info(project_id, id, opts)
  data
end

#get_creative_template(project_id, id, opts = {}) ⇒ CreativeTemplate

Parameters:

  • project_id (String)
  • id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1820
1821
1822
1823
# File 'lib/knievel/api/default_api.rb', line 1820

def get_creative_template(project_id, id, opts = {})
  data, _status_code, _headers = get_creative_template_with_http_info(project_id, id, opts)
  data
end

#get_creative_template_with_http_info(project_id, id, opts = {}) ⇒ Array<(CreativeTemplate, Integer, Hash)>

Returns CreativeTemplate data, response status code and response headers.

Parameters:

  • project_id (String)
  • id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    CreativeTemplate data, response status code and response headers



1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
# File 'lib/knievel/api/default_api.rb', line 1829

def get_creative_template_with_http_info(project_id, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.get_creative_template ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.get_creative_template"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.get_creative_template"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/creative-templates/{id}'.sub('{project_id}', CGI.escape(project_id.to_s)).sub('{id}', CGI.escape(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; charset=utf-8']) unless header_params['Accept']

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

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

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

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

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

#get_creative_with_http_info(project_id, id, opts = {}) ⇒ Array<(Creative, Integer, Hash)>

Returns Creative data, response status code and response headers.

Parameters:

  • project_id (String)
  • id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    Creative data, response status code and response headers



1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
# File 'lib/knievel/api/default_api.rb', line 1764

def get_creative_with_http_info(project_id, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.get_creative ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.get_creative"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.get_creative"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/creatives/{id}'.sub('{project_id}', CGI.escape(project_id.to_s)).sub('{id}', CGI.escape(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; charset=utf-8']) unless header_params['Accept']

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

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

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

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

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

#get_flight(project_id, id, opts = {}) ⇒ Flight

Parameters:

  • project_id (String)
  • id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1885
1886
1887
1888
# File 'lib/knievel/api/default_api.rb', line 1885

def get_flight(project_id, id, opts = {})
  data, _status_code, _headers = get_flight_with_http_info(project_id, id, opts)
  data
end

#get_flight_with_http_info(project_id, id, opts = {}) ⇒ Array<(Flight, Integer, Hash)>

Returns Flight data, response status code and response headers.

Parameters:

  • project_id (String)
  • id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    Flight data, response status code and response headers



1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
# File 'lib/knievel/api/default_api.rb', line 1894

def get_flight_with_http_info(project_id, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.get_flight ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.get_flight"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.get_flight"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/flights/{id}'.sub('{project_id}', CGI.escape(project_id.to_s)).sub('{id}', CGI.escape(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; charset=utf-8']) unless header_params['Accept']

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

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

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

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

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

#get_priority(project_id, id, opts = {}) ⇒ Priority

Parameters:

  • project_id (String)
  • id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1950
1951
1952
1953
# File 'lib/knievel/api/default_api.rb', line 1950

def get_priority(project_id, id, opts = {})
  data, _status_code, _headers = get_priority_with_http_info(project_id, id, opts)
  data
end

#get_priority_with_http_info(project_id, id, opts = {}) ⇒ Array<(Priority, Integer, Hash)>

Returns Priority data, response status code and response headers.

Parameters:

  • project_id (String)
  • id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    Priority data, response status code and response headers



1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
# File 'lib/knievel/api/default_api.rb', line 1959

def get_priority_with_http_info(project_id, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.get_priority ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.get_priority"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.get_priority"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/priorities/{id}'.sub('{project_id}', CGI.escape(project_id.to_s)).sub('{id}', CGI.escape(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; charset=utf-8']) unless header_params['Accept']

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

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

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

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

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

#get_project(org_id, project_id, opts = {}) ⇒ ProjectResponse

Read a single project by id (path).

Parameters:

  • org_id (String)
  • project_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2016
2017
2018
2019
# File 'lib/knievel/api/default_api.rb', line 2016

def get_project(org_id, project_id, opts = {})
  data, _status_code, _headers = get_project_with_http_info(org_id, project_id, opts)
  data
end

#get_project_with_http_info(org_id, project_id, opts = {}) ⇒ Array<(ProjectResponse, Integer, Hash)>

Read a single project by id (path).

Parameters:

  • org_id (String)
  • project_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    ProjectResponse data, response status code and response headers



2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
# File 'lib/knievel/api/default_api.rb', line 2026

def get_project_with_http_info(org_id, project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.get_project ...'
  end
  # verify the required parameter 'org_id' is set
  if @api_client.config.client_side_validation && org_id.nil?
    fail ArgumentError, "Missing the required parameter 'org_id' when calling DefaultApi.get_project"
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.get_project"
  end
  # resource path
  local_var_path = '/v1/orgs/{org_id}/projects/{project_id}'.sub('{org_id}', CGI.escape(org_id.to_s)).sub('{project_id}', CGI.escape(project_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; charset=utf-8']) unless header_params['Accept']

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

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

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

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

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

#get_site(project_id, id, opts = {}) ⇒ Site

Parameters:

  • project_id (String)
  • id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2082
2083
2084
2085
# File 'lib/knievel/api/default_api.rb', line 2082

def get_site(project_id, id, opts = {})
  data, _status_code, _headers = get_site_with_http_info(project_id, id, opts)
  data
end

#get_site_with_http_info(project_id, id, opts = {}) ⇒ Array<(Site, Integer, Hash)>

Returns Site data, response status code and response headers.

Parameters:

  • project_id (String)
  • id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    Site data, response status code and response headers



2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
# File 'lib/knievel/api/default_api.rb', line 2091

def get_site_with_http_info(project_id, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.get_site ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.get_site"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.get_site"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/sites/{id}'.sub('{project_id}', CGI.escape(project_id.to_s)).sub('{id}', CGI.escape(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; charset=utf-8']) unless header_params['Accept']

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

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

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

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

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

#get_zone(project_id, id, opts = {}) ⇒ Zone

Parameters:

  • project_id (String)
  • id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2147
2148
2149
2150
# File 'lib/knievel/api/default_api.rb', line 2147

def get_zone(project_id, id, opts = {})
  data, _status_code, _headers = get_zone_with_http_info(project_id, id, opts)
  data
end

#get_zone_with_http_info(project_id, id, opts = {}) ⇒ Array<(Zone, Integer, Hash)>

Returns Zone data, response status code and response headers.

Parameters:

  • project_id (String)
  • id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    Zone data, response status code and response headers



2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
# File 'lib/knievel/api/default_api.rb', line 2156

def get_zone_with_http_info(project_id, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.get_zone ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.get_zone"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.get_zone"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/zones/{id}'.sub('{project_id}', CGI.escape(project_id.to_s)).sub('{id}', CGI.escape(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; charset=utf-8']) unless header_params['Accept']

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

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

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

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

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

#healthz(opts = {}) ⇒ String

Liveness — k8s liveness probe key.

Parameters:

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

    the optional parameters

Returns:

  • (String)


2211
2212
2213
2214
# File 'lib/knievel/api/default_api.rb', line 2211

def healthz(opts = {})
  data, _status_code, _headers = healthz_with_http_info(opts)
  data
end

#healthz_with_http_info(opts = {}) ⇒ Array<(String, Integer, Hash)>

Liveness — k8s liveness probe key.

Parameters:

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

    the optional parameters

Returns:

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

    String data, response status code and response headers



2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
# File 'lib/knievel/api/default_api.rb', line 2219

def healthz_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.healthz ...'
  end
  # resource path
  local_var_path = '/healthz'

  # 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(['text/plain; charset=utf-8']) unless header_params['Accept']

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

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

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

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

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

#list_ad_library_items(org_id, opts = {}) ⇒ AdLibraryItemList

Parameters:

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

    the optional parameters

Returns:



2266
2267
2268
2269
# File 'lib/knievel/api/default_api.rb', line 2266

def list_ad_library_items(org_id, opts = {})
  data, _status_code, _headers = list_ad_library_items_with_http_info(org_id, opts)
  data
end

#list_ad_library_items_with_http_info(org_id, opts = {}) ⇒ Array<(AdLibraryItemList, Integer, Hash)>

Returns AdLibraryItemList data, response status code and response headers.

Parameters:

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

    the optional parameters

Returns:

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

    AdLibraryItemList data, response status code and response headers



2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
# File 'lib/knievel/api/default_api.rb', line 2274

def list_ad_library_items_with_http_info(org_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.list_ad_library_items ...'
  end
  # verify the required parameter 'org_id' is set
  if @api_client.config.client_side_validation && org_id.nil?
    fail ArgumentError, "Missing the required parameter 'org_id' when calling DefaultApi.list_ad_library_items"
  end
  # resource path
  local_var_path = '/v1/orgs/{org_id}/ad-library/items'.sub('{org_id}', CGI.escape(org_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; charset=utf-8']) unless header_params['Accept']

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

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

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

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

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

#list_ad_types(project_id, opts = {}) ⇒ AdTypeList

Parameters:

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

    the optional parameters

Returns:



2325
2326
2327
2328
# File 'lib/knievel/api/default_api.rb', line 2325

def list_ad_types(project_id, opts = {})
  data, _status_code, _headers = list_ad_types_with_http_info(project_id, opts)
  data
end

#list_ad_types_with_http_info(project_id, opts = {}) ⇒ Array<(AdTypeList, Integer, Hash)>

Returns AdTypeList data, response status code and response headers.

Parameters:

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

    the optional parameters

Returns:

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

    AdTypeList data, response status code and response headers



2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
# File 'lib/knievel/api/default_api.rb', line 2333

def list_ad_types_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.list_ad_types ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.list_ad_types"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/ad-types'.sub('{project_id}', CGI.escape(project_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; charset=utf-8']) unless header_params['Accept']

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

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

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

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

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

#list_ads(project_id, opts = {}) ⇒ AdList

Parameters:

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

    the optional parameters

Returns:



2384
2385
2386
2387
# File 'lib/knievel/api/default_api.rb', line 2384

def list_ads(project_id, opts = {})
  data, _status_code, _headers = list_ads_with_http_info(project_id, opts)
  data
end

#list_ads_with_http_info(project_id, opts = {}) ⇒ Array<(AdList, Integer, Hash)>

Returns AdList data, response status code and response headers.

Parameters:

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

    the optional parameters

Returns:

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

    AdList data, response status code and response headers



2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
# File 'lib/knievel/api/default_api.rb', line 2392

def list_ads_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.list_ads ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.list_ads"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/ads'.sub('{project_id}', CGI.escape(project_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; charset=utf-8']) unless header_params['Accept']

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

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

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

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

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

#list_advertisers(project_id, opts = {}) ⇒ AdvertiserList

Parameters:

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

    the optional parameters

Returns:



2443
2444
2445
2446
# File 'lib/knievel/api/default_api.rb', line 2443

def list_advertisers(project_id, opts = {})
  data, _status_code, _headers = list_advertisers_with_http_info(project_id, opts)
  data
end

#list_advertisers_with_http_info(project_id, opts = {}) ⇒ Array<(AdvertiserList, Integer, Hash)>

Returns AdvertiserList data, response status code and response headers.

Parameters:

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

    the optional parameters

Returns:

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

    AdvertiserList data, response status code and response headers



2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
# File 'lib/knievel/api/default_api.rb', line 2451

def list_advertisers_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.list_advertisers ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.list_advertisers"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/advertisers'.sub('{project_id}', CGI.escape(project_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; charset=utf-8']) unless header_params['Accept']

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

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

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

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

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

#list_campaigns(project_id, opts = {}) ⇒ CampaignList

Parameters:

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

    the optional parameters

Returns:



2502
2503
2504
2505
# File 'lib/knievel/api/default_api.rb', line 2502

def list_campaigns(project_id, opts = {})
  data, _status_code, _headers = list_campaigns_with_http_info(project_id, opts)
  data
end

#list_campaigns_with_http_info(project_id, opts = {}) ⇒ Array<(CampaignList, Integer, Hash)>

Returns CampaignList data, response status code and response headers.

Parameters:

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

    the optional parameters

Returns:

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

    CampaignList data, response status code and response headers



2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
# File 'lib/knievel/api/default_api.rb', line 2510

def list_campaigns_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.list_campaigns ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.list_campaigns"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/campaigns'.sub('{project_id}', CGI.escape(project_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; charset=utf-8']) unless header_params['Accept']

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

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

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

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

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

#list_channels(project_id, opts = {}) ⇒ ChannelList

Parameters:

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

    the optional parameters

Returns:



2561
2562
2563
2564
# File 'lib/knievel/api/default_api.rb', line 2561

def list_channels(project_id, opts = {})
  data, _status_code, _headers = list_channels_with_http_info(project_id, opts)
  data
end

#list_channels_with_http_info(project_id, opts = {}) ⇒ Array<(ChannelList, Integer, Hash)>

Returns ChannelList data, response status code and response headers.

Parameters:

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

    the optional parameters

Returns:

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

    ChannelList data, response status code and response headers



2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
# File 'lib/knievel/api/default_api.rb', line 2569

def list_channels_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.list_channels ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.list_channels"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/channels'.sub('{project_id}', CGI.escape(project_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; charset=utf-8']) unless header_params['Accept']

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

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

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

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

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

#list_creative_templates(project_id, opts = {}) ⇒ CreativeTemplateList

Parameters:

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

    the optional parameters

Returns:



2620
2621
2622
2623
# File 'lib/knievel/api/default_api.rb', line 2620

def list_creative_templates(project_id, opts = {})
  data, _status_code, _headers = list_creative_templates_with_http_info(project_id, opts)
  data
end

#list_creative_templates_with_http_info(project_id, opts = {}) ⇒ Array<(CreativeTemplateList, Integer, Hash)>

Returns CreativeTemplateList data, response status code and response headers.

Parameters:

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

    the optional parameters

Returns:

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

    CreativeTemplateList data, response status code and response headers



2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
# File 'lib/knievel/api/default_api.rb', line 2628

def list_creative_templates_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.list_creative_templates ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.list_creative_templates"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/creative-templates'.sub('{project_id}', CGI.escape(project_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; charset=utf-8']) unless header_params['Accept']

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

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

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

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

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

#list_creatives(project_id, opts = {}) ⇒ CreativeList

Parameters:

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

    the optional parameters

Returns:



2679
2680
2681
2682
# File 'lib/knievel/api/default_api.rb', line 2679

def list_creatives(project_id, opts = {})
  data, _status_code, _headers = list_creatives_with_http_info(project_id, opts)
  data
end

#list_creatives_with_http_info(project_id, opts = {}) ⇒ Array<(CreativeList, Integer, Hash)>

Returns CreativeList data, response status code and response headers.

Parameters:

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

    the optional parameters

Returns:

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

    CreativeList data, response status code and response headers



2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
# File 'lib/knievel/api/default_api.rb', line 2687

def list_creatives_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.list_creatives ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.list_creatives"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/creatives'.sub('{project_id}', CGI.escape(project_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; charset=utf-8']) unless header_params['Accept']

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

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

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

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

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

#list_flights(project_id, opts = {}) ⇒ FlightList

Parameters:

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

    the optional parameters

Returns:



2738
2739
2740
2741
# File 'lib/knievel/api/default_api.rb', line 2738

def list_flights(project_id, opts = {})
  data, _status_code, _headers = list_flights_with_http_info(project_id, opts)
  data
end

#list_flights_with_http_info(project_id, opts = {}) ⇒ Array<(FlightList, Integer, Hash)>

Returns FlightList data, response status code and response headers.

Parameters:

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

    the optional parameters

Returns:

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

    FlightList data, response status code and response headers



2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
# File 'lib/knievel/api/default_api.rb', line 2746

def list_flights_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.list_flights ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.list_flights"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/flights'.sub('{project_id}', CGI.escape(project_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; charset=utf-8']) unless header_params['Accept']

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

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

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

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

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

#list_priorities(project_id, opts = {}) ⇒ PriorityList

Parameters:

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

    the optional parameters

Returns:



2797
2798
2799
2800
# File 'lib/knievel/api/default_api.rb', line 2797

def list_priorities(project_id, opts = {})
  data, _status_code, _headers = list_priorities_with_http_info(project_id, opts)
  data
end

#list_priorities_with_http_info(project_id, opts = {}) ⇒ Array<(PriorityList, Integer, Hash)>

Returns PriorityList data, response status code and response headers.

Parameters:

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

    the optional parameters

Returns:

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

    PriorityList data, response status code and response headers



2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
# File 'lib/knievel/api/default_api.rb', line 2805

def list_priorities_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.list_priorities ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.list_priorities"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/priorities'.sub('{project_id}', CGI.escape(project_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; charset=utf-8']) unless header_params['Accept']

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

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

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

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

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

#list_sites(project_id, opts = {}) ⇒ SiteList

Parameters:

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

    the optional parameters

Returns:



2856
2857
2858
2859
# File 'lib/knievel/api/default_api.rb', line 2856

def list_sites(project_id, opts = {})
  data, _status_code, _headers = list_sites_with_http_info(project_id, opts)
  data
end

#list_sites_with_http_info(project_id, opts = {}) ⇒ Array<(SiteList, Integer, Hash)>

Returns SiteList data, response status code and response headers.

Parameters:

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

    the optional parameters

Returns:

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

    SiteList data, response status code and response headers



2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
# File 'lib/knievel/api/default_api.rb', line 2864

def list_sites_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.list_sites ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.list_sites"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/sites'.sub('{project_id}', CGI.escape(project_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; charset=utf-8']) unless header_params['Accept']

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

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

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

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

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

#list_tokens(org_id, opts = {}) ⇒ TokenListResponse

List tokens (metadata only; secrets never leave the mint response). Min role: org-admin.

Parameters:

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

    the optional parameters

Returns:



2916
2917
2918
2919
# File 'lib/knievel/api/default_api.rb', line 2916

def list_tokens(org_id, opts = {})
  data, _status_code, _headers = list_tokens_with_http_info(org_id, opts)
  data
end

#list_tokens_with_http_info(org_id, opts = {}) ⇒ Array<(TokenListResponse, Integer, Hash)>

List tokens (metadata only; secrets never leave the mint response). Min role: org-admin.

Parameters:

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

    the optional parameters

Returns:

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

    TokenListResponse data, response status code and response headers



2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
# File 'lib/knievel/api/default_api.rb', line 2925

def list_tokens_with_http_info(org_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.list_tokens ...'
  end
  # verify the required parameter 'org_id' is set
  if @api_client.config.client_side_validation && org_id.nil?
    fail ArgumentError, "Missing the required parameter 'org_id' when calling DefaultApi.list_tokens"
  end
  # resource path
  local_var_path = '/v1/orgs/{org_id}/tokens'.sub('{org_id}', CGI.escape(org_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; charset=utf-8']) unless header_params['Accept']

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

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

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

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

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

#list_zones(project_id, opts = {}) ⇒ ZoneList

Parameters:

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

    the optional parameters

Returns:



2976
2977
2978
2979
# File 'lib/knievel/api/default_api.rb', line 2976

def list_zones(project_id, opts = {})
  data, _status_code, _headers = list_zones_with_http_info(project_id, opts)
  data
end

#list_zones_with_http_info(project_id, opts = {}) ⇒ Array<(ZoneList, Integer, Hash)>

Returns ZoneList data, response status code and response headers.

Parameters:

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

    the optional parameters

Returns:

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

    ZoneList data, response status code and response headers



2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
# File 'lib/knievel/api/default_api.rb', line 2984

def list_zones_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.list_zones ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.list_zones"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/zones'.sub('{project_id}', CGI.escape(project_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; charset=utf-8']) unless header_params['Accept']

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

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

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

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

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

#readyz(opts = {}) ⇒ String

Readiness — only 200 when knievel can serve. Per ‘REQUIREMENTS.md` § 10.6, the full check has four criteria; today only the DB-reachability one is real.

Parameters:

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

    the optional parameters

Returns:

  • (String)


3035
3036
3037
3038
# File 'lib/knievel/api/default_api.rb', line 3035

def readyz(opts = {})
  data, _status_code, _headers = readyz_with_http_info(opts)
  data
end

#readyz_with_http_info(opts = {}) ⇒ Array<(String, Integer, Hash)>

Readiness — only 200 when knievel can serve. Per &#x60;REQUIREMENTS.md&#x60; § 10.6, the full check has four criteria; today only the DB-reachability one is real.

Parameters:

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

    the optional parameters

Returns:

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

    String data, response status code and response headers



3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
# File 'lib/knievel/api/default_api.rb', line 3043

def readyz_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.readyz ...'
  end
  # resource path
  local_var_path = '/readyz'

  # 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(['text/plain; charset=utf-8']) unless header_params['Accept']

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

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

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

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

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

#revoke_token(org_id, token_id, opts = {}) ⇒ nil

Revoke a token (soft delete via ‘revoked_at`). The auth path filters revoked rows at the next request. Min role: org-admin.

Parameters:

  • org_id (String)
  • token_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


3092
3093
3094
3095
# File 'lib/knievel/api/default_api.rb', line 3092

def revoke_token(org_id, token_id, opts = {})
  revoke_token_with_http_info(org_id, token_id, opts)
  nil
end

#revoke_token_with_http_info(org_id, token_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Revoke a token (soft delete via &#x60;revoked_at&#x60;). The auth path filters revoked rows at the next request. Min role: org-admin.

Parameters:

  • org_id (String)
  • token_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    nil, response status code and response headers



3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
# File 'lib/knievel/api/default_api.rb', line 3102

def revoke_token_with_http_info(org_id, token_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.revoke_token ...'
  end
  # verify the required parameter 'org_id' is set
  if @api_client.config.client_side_validation && org_id.nil?
    fail ArgumentError, "Missing the required parameter 'org_id' when calling DefaultApi.revoke_token"
  end
  # verify the required parameter 'token_id' is set
  if @api_client.config.client_side_validation && token_id.nil?
    fail ArgumentError, "Missing the required parameter 'token_id' when calling DefaultApi.revoke_token"
  end
  # resource path
  local_var_path = '/v1/orgs/{org_id}/tokens/{token_id}'.sub('{org_id}', CGI.escape(org_id.to_s)).sub('{token_id}', CGI.escape(token_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; charset=utf-8']) unless header_params['Accept']

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

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

  # return_type
  return_type = opts[:debug_return_type]

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

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

#update_ad(project_id, id, update_ad_request, opts = {}) ⇒ Ad

Parameters:

  • project_id (String)
  • id (Integer)
  • update_ad_request (UpdateAdRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



3159
3160
3161
3162
# File 'lib/knievel/api/default_api.rb', line 3159

def update_ad(project_id, id, update_ad_request, opts = {})
  data, _status_code, _headers = update_ad_with_http_info(project_id, id, update_ad_request, opts)
  data
end

#update_ad_library_item(org_id, item_id, update_ad_library_item_request, opts = {}) ⇒ AdLibraryItem

Parameters:

  • org_id (String)
  • item_id (String)
  • update_ad_library_item_request (UpdateAdLibraryItemRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



3235
3236
3237
3238
# File 'lib/knievel/api/default_api.rb', line 3235

def update_ad_library_item(org_id, item_id, update_ad_library_item_request, opts = {})
  data, _status_code, _headers = update_ad_library_item_with_http_info(org_id, item_id, update_ad_library_item_request, opts)
  data
end

#update_ad_library_item_with_http_info(org_id, item_id, update_ad_library_item_request, opts = {}) ⇒ Array<(AdLibraryItem, Integer, Hash)>

Returns AdLibraryItem data, response status code and response headers.

Parameters:

  • org_id (String)
  • item_id (String)
  • update_ad_library_item_request (UpdateAdLibraryItemRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    AdLibraryItem data, response status code and response headers



3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
# File 'lib/knievel/api/default_api.rb', line 3245

def update_ad_library_item_with_http_info(org_id, item_id, update_ad_library_item_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.update_ad_library_item ...'
  end
  # verify the required parameter 'org_id' is set
  if @api_client.config.client_side_validation && org_id.nil?
    fail ArgumentError, "Missing the required parameter 'org_id' when calling DefaultApi.update_ad_library_item"
  end
  # verify the required parameter 'item_id' is set
  if @api_client.config.client_side_validation && item_id.nil?
    fail ArgumentError, "Missing the required parameter 'item_id' when calling DefaultApi.update_ad_library_item"
  end
  # verify the required parameter 'update_ad_library_item_request' is set
  if @api_client.config.client_side_validation && update_ad_library_item_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_ad_library_item_request' when calling DefaultApi.update_ad_library_item"
  end
  # resource path
  local_var_path = '/v1/orgs/{org_id}/ad-library/items/{item_id}'.sub('{org_id}', CGI.escape(org_id.to_s)).sub('{item_id}', CGI.escape(item_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; charset=utf-8']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json; charset=utf-8'])
  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_ad_library_item_request)

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

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

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

#update_ad_with_http_info(project_id, id, update_ad_request, opts = {}) ⇒ Array<(Ad, Integer, Hash)>

Returns Ad data, response status code and response headers.

Parameters:

  • project_id (String)
  • id (Integer)
  • update_ad_request (UpdateAdRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    Ad data, response status code and response headers



3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
# File 'lib/knievel/api/default_api.rb', line 3169

def update_ad_with_http_info(project_id, id, update_ad_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.update_ad ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.update_ad"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.update_ad"
  end
  # verify the required parameter 'update_ad_request' is set
  if @api_client.config.client_side_validation && update_ad_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_ad_request' when calling DefaultApi.update_ad"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/ads/{id}'.sub('{project_id}', CGI.escape(project_id.to_s)).sub('{id}', CGI.escape(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; charset=utf-8']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json; charset=utf-8'])
  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_ad_request)

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

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

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

#update_advertiser(project_id, id, update_advertiser_request, opts = {}) ⇒ Advertiser

Parameters:

  • project_id (String)
  • id (Integer)
  • update_advertiser_request (UpdateAdvertiserRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



3311
3312
3313
3314
# File 'lib/knievel/api/default_api.rb', line 3311

def update_advertiser(project_id, id, update_advertiser_request, opts = {})
  data, _status_code, _headers = update_advertiser_with_http_info(project_id, id, update_advertiser_request, opts)
  data
end

#update_advertiser_with_http_info(project_id, id, update_advertiser_request, opts = {}) ⇒ Array<(Advertiser, Integer, Hash)>

Returns Advertiser data, response status code and response headers.

Parameters:

  • project_id (String)
  • id (Integer)
  • update_advertiser_request (UpdateAdvertiserRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    Advertiser data, response status code and response headers



3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
# File 'lib/knievel/api/default_api.rb', line 3321

def update_advertiser_with_http_info(project_id, id, update_advertiser_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.update_advertiser ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.update_advertiser"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.update_advertiser"
  end
  # verify the required parameter 'update_advertiser_request' is set
  if @api_client.config.client_side_validation && update_advertiser_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_advertiser_request' when calling DefaultApi.update_advertiser"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/advertisers/{id}'.sub('{project_id}', CGI.escape(project_id.to_s)).sub('{id}', CGI.escape(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; charset=utf-8']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json; charset=utf-8'])
  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_advertiser_request)

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

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

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

#update_campaign(project_id, id, update_campaign_request, opts = {}) ⇒ Campaign

Parameters:

  • project_id (String)
  • id (Integer)
  • update_campaign_request (UpdateCampaignRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



3387
3388
3389
3390
# File 'lib/knievel/api/default_api.rb', line 3387

def update_campaign(project_id, id, update_campaign_request, opts = {})
  data, _status_code, _headers = update_campaign_with_http_info(project_id, id, update_campaign_request, opts)
  data
end

#update_campaign_with_http_info(project_id, id, update_campaign_request, opts = {}) ⇒ Array<(Campaign, Integer, Hash)>

Returns Campaign data, response status code and response headers.

Parameters:

  • project_id (String)
  • id (Integer)
  • update_campaign_request (UpdateCampaignRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    Campaign data, response status code and response headers



3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
# File 'lib/knievel/api/default_api.rb', line 3397

def update_campaign_with_http_info(project_id, id, update_campaign_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.update_campaign ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.update_campaign"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.update_campaign"
  end
  # verify the required parameter 'update_campaign_request' is set
  if @api_client.config.client_side_validation && update_campaign_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_campaign_request' when calling DefaultApi.update_campaign"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/campaigns/{id}'.sub('{project_id}', CGI.escape(project_id.to_s)).sub('{id}', CGI.escape(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; charset=utf-8']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json; charset=utf-8'])
  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_campaign_request)

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

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

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

#update_creative_template(project_id, id, update_creative_template_request, opts = {}) ⇒ CreativeTemplate

PATCH bumps ‘version` whenever the schema field is provided (per `API.md` § 3.6 — schema changes are versioned but do not retroactively re-validate existing creatives).

Parameters:

  • project_id (String)
  • id (Integer)
  • update_creative_template_request (UpdateCreativeTemplateRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



3464
3465
3466
3467
# File 'lib/knievel/api/default_api.rb', line 3464

def update_creative_template(project_id, id, update_creative_template_request, opts = {})
  data, _status_code, _headers = update_creative_template_with_http_info(project_id, id, update_creative_template_request, opts)
  data
end

#update_creative_template_with_http_info(project_id, id, update_creative_template_request, opts = {}) ⇒ Array<(CreativeTemplate, Integer, Hash)>

PATCH bumps &#x60;version&#x60; whenever the schema field is provided (per &#x60;API.md&#x60; § 3.6 — schema changes are versioned but do not retroactively re-validate existing creatives).

Parameters:

  • project_id (String)
  • id (Integer)
  • update_creative_template_request (UpdateCreativeTemplateRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    CreativeTemplate data, response status code and response headers



3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
# File 'lib/knievel/api/default_api.rb', line 3475

def update_creative_template_with_http_info(project_id, id, update_creative_template_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.update_creative_template ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.update_creative_template"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.update_creative_template"
  end
  # verify the required parameter 'update_creative_template_request' is set
  if @api_client.config.client_side_validation && update_creative_template_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_creative_template_request' when calling DefaultApi.update_creative_template"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/creative-templates/{id}'.sub('{project_id}', CGI.escape(project_id.to_s)).sub('{id}', CGI.escape(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; charset=utf-8']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json; charset=utf-8'])
  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_creative_template_request)

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

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

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

#update_flight(project_id, id, update_flight_request, opts = {}) ⇒ Flight

Parameters:

  • project_id (String)
  • id (Integer)
  • update_flight_request (UpdateFlightRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



3541
3542
3543
3544
# File 'lib/knievel/api/default_api.rb', line 3541

def update_flight(project_id, id, update_flight_request, opts = {})
  data, _status_code, _headers = update_flight_with_http_info(project_id, id, update_flight_request, opts)
  data
end

#update_flight_with_http_info(project_id, id, update_flight_request, opts = {}) ⇒ Array<(Flight, Integer, Hash)>

Returns Flight data, response status code and response headers.

Parameters:

  • project_id (String)
  • id (Integer)
  • update_flight_request (UpdateFlightRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    Flight data, response status code and response headers



3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
# File 'lib/knievel/api/default_api.rb', line 3551

def update_flight_with_http_info(project_id, id, update_flight_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.update_flight ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.update_flight"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.update_flight"
  end
  # verify the required parameter 'update_flight_request' is set
  if @api_client.config.client_side_validation && update_flight_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_flight_request' when calling DefaultApi.update_flight"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/flights/{id}'.sub('{project_id}', CGI.escape(project_id.to_s)).sub('{id}', CGI.escape(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; charset=utf-8']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json; charset=utf-8'])
  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_flight_request)

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

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

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

#update_site(project_id, id, update_site_request, opts = {}) ⇒ Site

Parameters:

  • project_id (String)
  • id (Integer)
  • update_site_request (UpdateSiteRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



3617
3618
3619
3620
# File 'lib/knievel/api/default_api.rb', line 3617

def update_site(project_id, id, update_site_request, opts = {})
  data, _status_code, _headers = update_site_with_http_info(project_id, id, update_site_request, opts)
  data
end

#update_site_with_http_info(project_id, id, update_site_request, opts = {}) ⇒ Array<(Site, Integer, Hash)>

Returns Site data, response status code and response headers.

Parameters:

  • project_id (String)
  • id (Integer)
  • update_site_request (UpdateSiteRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    Site data, response status code and response headers



3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
# File 'lib/knievel/api/default_api.rb', line 3627

def update_site_with_http_info(project_id, id, update_site_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.update_site ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.update_site"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.update_site"
  end
  # verify the required parameter 'update_site_request' is set
  if @api_client.config.client_side_validation && update_site_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_site_request' when calling DefaultApi.update_site"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/sites/{id}'.sub('{project_id}', CGI.escape(project_id.to_s)).sub('{id}', CGI.escape(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; charset=utf-8']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json; charset=utf-8'])
  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_site_request)

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

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

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

#update_zone(project_id, id, update_zone_request, opts = {}) ⇒ Zone

Parameters:

  • project_id (String)
  • id (Integer)
  • update_zone_request (UpdateZoneRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



3693
3694
3695
3696
# File 'lib/knievel/api/default_api.rb', line 3693

def update_zone(project_id, id, update_zone_request, opts = {})
  data, _status_code, _headers = update_zone_with_http_info(project_id, id, update_zone_request, opts)
  data
end

#update_zone_with_http_info(project_id, id, update_zone_request, opts = {}) ⇒ Array<(Zone, Integer, Hash)>

Returns Zone data, response status code and response headers.

Parameters:

  • project_id (String)
  • id (Integer)
  • update_zone_request (UpdateZoneRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    Zone data, response status code and response headers



3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
# File 'lib/knievel/api/default_api.rb', line 3703

def update_zone_with_http_info(project_id, id, update_zone_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.update_zone ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.update_zone"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.update_zone"
  end
  # verify the required parameter 'update_zone_request' is set
  if @api_client.config.client_side_validation && update_zone_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_zone_request' when calling DefaultApi.update_zone"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/zones/{id}'.sub('{project_id}', CGI.escape(project_id.to_s)).sub('{id}', CGI.escape(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; charset=utf-8']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json; charset=utf-8'])
  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_zone_request)

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

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

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

#upload_creative_image(project_id, id, file, opts = {}) ⇒ Creative

Multipart image upload (Phase 3.32). Validates the body against the ‘image_upload` core (size + magic bytes + MIME allow-list), writes through the configured `ImageStore`, and updates the creative row’s ‘image_url` in the same transaction. Min role: editor (matches `createCreative`).

Parameters:

  • project_id (String)
  • id (Integer)
  • file (File)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



3770
3771
3772
3773
# File 'lib/knievel/api/default_api.rb', line 3770

def upload_creative_image(project_id, id, file, opts = {})
  data, _status_code, _headers = upload_creative_image_with_http_info(project_id, id, file, opts)
  data
end

#upload_creative_image_with_http_info(project_id, id, file, opts = {}) ⇒ Array<(Creative, Integer, Hash)>

Multipart image upload (Phase 3.32). Validates the body against the &#x60;image_upload&#x60; core (size + magic bytes + MIME allow-list), writes through the configured &#x60;ImageStore&#x60;, and updates the creative row&#39;s &#x60;image_url&#x60; in the same transaction. Min role: editor (matches &#x60;createCreative&#x60;).

Parameters:

  • project_id (String)
  • id (Integer)
  • file (File)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    Creative data, response status code and response headers



3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
# File 'lib/knievel/api/default_api.rb', line 3781

def upload_creative_image_with_http_info(project_id, id, file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.upload_creative_image ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.upload_creative_image"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.upload_creative_image"
  end
  # verify the required parameter 'file' is set
  if @api_client.config.client_side_validation && file.nil?
    fail ArgumentError, "Missing the required parameter 'file' when calling DefaultApi.upload_creative_image"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/creatives/{id}/image'.sub('{project_id}', CGI.escape(project_id.to_s)).sub('{id}', CGI.escape(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; charset=utf-8']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['multipart/form-data'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

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

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

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

#upsert_site_by_url(project_id, upsert_site_by_url_request, opts = {}) ⇒ Site

Natural-key upsert. Returns the existing row (200) when a site with the same URL exists; otherwise creates (201). Per ‘API.md` § 3.7: `:upsertByUrl` is the canonical entry point for URL-driven flows.

Parameters:

  • project_id (String)
  • upsert_site_by_url_request (UpsertSiteByUrlRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



3848
3849
3850
3851
# File 'lib/knievel/api/default_api.rb', line 3848

def upsert_site_by_url(project_id, upsert_site_by_url_request, opts = {})
  data, _status_code, _headers = upsert_site_by_url_with_http_info(project_id, upsert_site_by_url_request, opts)
  data
end

#upsert_site_by_url_with_http_info(project_id, upsert_site_by_url_request, opts = {}) ⇒ Array<(Site, Integer, Hash)>

Natural-key upsert. Returns the existing row (200) when a site with the same URL exists; otherwise creates (201). Per &#x60;API.md&#x60; § 3.7: &#x60;:upsertByUrl&#x60; is the canonical entry point for URL-driven flows.

Parameters:

  • project_id (String)
  • upsert_site_by_url_request (UpsertSiteByUrlRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    Site data, response status code and response headers



3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
# File 'lib/knievel/api/default_api.rb', line 3858

def upsert_site_by_url_with_http_info(project_id, upsert_site_by_url_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.upsert_site_by_url ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling DefaultApi.upsert_site_by_url"
  end
  # verify the required parameter 'upsert_site_by_url_request' is set
  if @api_client.config.client_side_validation && upsert_site_by_url_request.nil?
    fail ArgumentError, "Missing the required parameter 'upsert_site_by_url_request' when calling DefaultApi.upsert_site_by_url"
  end
  # resource path
  local_var_path = '/v1/projects/{project_id}/sites:upsertByUrl'.sub('{project_id}', CGI.escape(project_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; charset=utf-8']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json; charset=utf-8'])
  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(upsert_site_by_url_request)

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

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

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

#version(opts = {}) ⇒ VersionResponse

Build metadata + effective auth policy.

Parameters:

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

    the optional parameters

Returns:



3918
3919
3920
3921
# File 'lib/knievel/api/default_api.rb', line 3918

def version(opts = {})
  data, _status_code, _headers = version_with_http_info(opts)
  data
end

#version_with_http_info(opts = {}) ⇒ Array<(VersionResponse, Integer, Hash)>

Build metadata + effective auth policy.

Parameters:

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

    the optional parameters

Returns:

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

    VersionResponse data, response status code and response headers



3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
# File 'lib/knievel/api/default_api.rb', line 3926

def version_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DefaultApi.version ...'
  end
  # resource path
  local_var_path = '/version'

  # 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; charset=utf-8']) unless header_params['Accept']

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

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

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

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

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