Class: WalleeRubySdk::WebhookURLsService

Inherits:
Object
  • Object
show all
Defined in:
lib/wallee-ruby-sdk/service/webhook_urls_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ WebhookURLsService

Returns a new instance of WebhookURLsService.



28
29
30
# File 'lib/wallee-ruby-sdk/service/webhook_urls_service.rb', line 28

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



25
26
27
# File 'lib/wallee-ruby-sdk/service/webhook_urls_service.rb', line 25

def api_client
  @api_client
end

Instance Method Details

#delete_webhooks_urls_bulk(space, request_body, opts = {}) ⇒ Array<RestApiBulkOperationResult>

Delete multiple webhook URLs

Parameters:

  • space (Integer)

    Specifies the ID of the space the operation should be executed in.

  • request_body (Array<Integer>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



36
37
38
39
# File 'lib/wallee-ruby-sdk/service/webhook_urls_service.rb', line 36

def delete_webhooks_urls_bulk(space, request_body, opts = {})
  data, _status_code, _headers = delete_webhooks_urls_bulk_with_http_info(space, request_body, opts)
  data
end

#delete_webhooks_urls_bulk_with_http_info(space, request_body, opts = {}) ⇒ Array<(Array<RestApiBulkOperationResult>, Integer, Hash)>

Returns Array<RestApiBulkOperationResult> data, response status code and response headers.

Parameters:

  • space (Integer)

    Specifies the ID of the space the operation should be executed in.

  • request_body (Array<Integer>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    Array<RestApiBulkOperationResult> data, response status code and response headers



47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# File 'lib/wallee-ruby-sdk/service/webhook_urls_service.rb', line 47

def delete_webhooks_urls_bulk_with_http_info(space, request_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookURLsService.delete_webhooks_urls_bulk ...'
  end
  # verify the required parameter 'space' is set
  if @api_client.config.client_side_validation && space.nil?
    fail ArgumentError, "Missing the required parameter 'space' when calling WebhookURLsService.delete_webhooks_urls_bulk"
  end
  # verify the required parameter 'request_body' is set
  if @api_client.config.client_side_validation && request_body.nil?
    fail ArgumentError, "Missing the required parameter 'request_body' when calling WebhookURLsService.delete_webhooks_urls_bulk"
  end
  # resource path
  local_var_path = '/webhooks/urls/bulk'

  # 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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  unless content_type.nil?
    header_params['Content-Type'] = content_type
  end
  header_params[:'Space'] = space

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

  # connection timeout
  connection_timeout = @api_client.config.timeout

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

  # return_type
  return_type = opts[:debug_return_type] || 'Array<RestApiBulkOperationResult>'

  new_options = opts.merge(
    :operation => :"WebhookURLsService.delete_webhooks_urls_bulk",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE.to_sym.downcase, local_var_path, new_options, connection_timeout)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookURLsService#delete_webhooks_urls_bulk\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end

#delete_webhooks_urls_id(id, space, opts = {}) ⇒ nil

Delete a webhook URL

Parameters:

  • id (Integer)
  • space (Integer)

    Specifies the ID of the space the operation should be executed in.

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

    the optional parameters

Returns:

  • (nil)


110
111
112
113
# File 'lib/wallee-ruby-sdk/service/webhook_urls_service.rb', line 110

def delete_webhooks_urls_id(id, space, opts = {})
  delete_webhooks_urls_id_with_http_info(id, space, opts)
  nil
end

#delete_webhooks_urls_id_with_http_info(id, space, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Returns nil, response status code and response headers.

Parameters:

  • id (Integer)
  • space (Integer)

    Specifies the ID of the space the operation should be executed in.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# File 'lib/wallee-ruby-sdk/service/webhook_urls_service.rb', line 121

def delete_webhooks_urls_id_with_http_info(id, space, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookURLsService.delete_webhooks_urls_id ...'
  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 WebhookURLsService.delete_webhooks_urls_id"
  end
  # verify the required parameter 'space' is set
  if @api_client.config.client_side_validation && space.nil?
    fail ArgumentError, "Missing the required parameter 'space' when calling WebhookURLsService.delete_webhooks_urls_id"
  end
  # resource path
  local_var_path = '/webhooks/urls/{id}'.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']) unless header_params['Accept']
  header_params[:'Space'] = space

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

  # connection timeout
  connection_timeout = @api_client.config.timeout

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

  # return_type
  return_type = opts[:debug_return_type]

  new_options = opts.merge(
    :operation => :"WebhookURLsService.delete_webhooks_urls_id",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE.to_sym.downcase, local_var_path, new_options, connection_timeout)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookURLsService#delete_webhooks_urls_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end

#get_webhooks_urls(space, opts = {}) ⇒ WebhookURLListResponse

List all webhook URLs

Parameters:

  • space (Integer)

    Specifies the ID of the space the operation should be executed in.

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

    the optional parameters

Options Hash (opts):

  • :after (Integer)

    Set to an object&#39;s ID to retrieve the page of objects coming immediately after the named object.

  • :before (Integer)

    Set to an object&#39;s ID to retrieve the page of objects coming immediately before the named object.

  • :expand (Array<String>)
  • :limit (Integer)

    A limit on the number of objects to be returned, between 1 and 100. Default is 10.

  • :order (SortingOrder)

    Specify to retrieve objects in chronological (ASC) or reverse chronological (DESC) order.

Returns:



183
184
185
186
# File 'lib/wallee-ruby-sdk/service/webhook_urls_service.rb', line 183

def get_webhooks_urls(space, opts = {})
  data, _status_code, _headers = get_webhooks_urls_with_http_info(space, opts)
  data
end

#get_webhooks_urls_id(id, space, opts = {}) ⇒ WebhookUrl

Retrieve a webhook URL

Parameters:

  • id (Integer)
  • space (Integer)

    Specifies the ID of the space the operation should be executed in.

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

    the optional parameters

Options Hash (opts):

  • :expand (Array<String>)

Returns:



274
275
276
277
# File 'lib/wallee-ruby-sdk/service/webhook_urls_service.rb', line 274

def get_webhooks_urls_id(id, space, opts = {})
  data, _status_code, _headers = get_webhooks_urls_id_with_http_info(id, space, opts)
  data
end

#get_webhooks_urls_id_with_http_info(id, space, opts = {}) ⇒ Array<(WebhookUrl, Integer, Hash)>

Returns WebhookUrl data, response status code and response headers.

Parameters:

  • id (Integer)
  • space (Integer)

    Specifies the ID of the space the operation should be executed in.

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

    the optional parameters

Options Hash (opts):

  • :expand (Array<String>)

Returns:

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

    WebhookUrl data, response status code and response headers



286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
# File 'lib/wallee-ruby-sdk/service/webhook_urls_service.rb', line 286

def get_webhooks_urls_id_with_http_info(id, space, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookURLsService.get_webhooks_urls_id ...'
  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 WebhookURLsService.get_webhooks_urls_id"
  end
  # verify the required parameter 'space' is set
  if @api_client.config.client_side_validation && space.nil?
    fail ArgumentError, "Missing the required parameter 'space' when calling WebhookURLsService.get_webhooks_urls_id"
  end
  # resource path
  local_var_path = '/webhooks/urls/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) unless opts[:'expand'].nil?

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

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

  # connection timeout
  connection_timeout = @api_client.config.timeout

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

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

  new_options = opts.merge(
    :operation => :"WebhookURLsService.get_webhooks_urls_id",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET.to_sym.downcase, local_var_path, new_options, connection_timeout)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookURLsService#get_webhooks_urls_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end

#get_webhooks_urls_search(space, opts = {}) ⇒ WebhookURLSearchResponse

Search webhook URLs

Parameters:

  • space (Integer)

    Specifies the ID of the space the operation should be executed in.

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

    the optional parameters

Options Hash (opts):

  • :expand (Array<String>)
  • :limit (Integer)

    A limit on the number of objects to be returned, between 1 and 100. Default is 10.

  • :offset (Integer)

    A cursor for pagination, specifies the number of objects to skip.

  • :order (String)

    The fields and order to sort the objects by.

  • :query (String)

    The search query to filter the objects by.

Returns:



349
350
351
352
# File 'lib/wallee-ruby-sdk/service/webhook_urls_service.rb', line 349

def get_webhooks_urls_search(space, opts = {})
  data, _status_code, _headers = get_webhooks_urls_search_with_http_info(space, opts)
  data
end

#get_webhooks_urls_search_with_http_info(space, opts = {}) ⇒ Array<(WebhookURLSearchResponse, Integer, Hash)>

Returns WebhookURLSearchResponse data, response status code and response headers.

Parameters:

  • space (Integer)

    Specifies the ID of the space the operation should be executed in.

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

    the optional parameters

Options Hash (opts):

  • :expand (Array<String>)
  • :limit (Integer)

    A limit on the number of objects to be returned, between 1 and 100. Default is 10.

  • :offset (Integer)

    A cursor for pagination, specifies the number of objects to skip.

  • :order (String)

    The fields and order to sort the objects by.

  • :query (String)

    The search query to filter the objects by.

Returns:

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

    WebhookURLSearchResponse data, response status code and response headers



364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
# File 'lib/wallee-ruby-sdk/service/webhook_urls_service.rb', line 364

def get_webhooks_urls_search_with_http_info(space, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookURLsService.get_webhooks_urls_search ...'
  end
  # verify the required parameter 'space' is set
  if @api_client.config.client_side_validation && space.nil?
    fail ArgumentError, "Missing the required parameter 'space' when calling WebhookURLsService.get_webhooks_urls_search"
  end
  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling WebhookURLsService.get_webhooks_urls_search, must be smaller than or equal to 100.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling WebhookURLsService.get_webhooks_urls_search, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] > 10000
    fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling WebhookURLsService.get_webhooks_urls_search, must be smaller than or equal to 10000.'
  end

  # resource path
  local_var_path = '/webhooks/urls/search'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) unless opts[:'expand'].nil?
  query_params[:'limit'] = opts[:'limit'] unless opts[:'limit'].nil?
  query_params[:'offset'] = opts[:'offset'] unless opts[:'offset'].nil?
  query_params[:'order'] = opts[:'order'] unless opts[:'order'].nil?
  query_params[:'query'] = opts[:'query'] unless opts[:'query'].nil?

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

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

  # connection timeout
  connection_timeout = @api_client.config.timeout

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

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

  new_options = opts.merge(
    :operation => :"WebhookURLsService.get_webhooks_urls_search",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET.to_sym.downcase, local_var_path, new_options, connection_timeout)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookURLsService#get_webhooks_urls_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end

#get_webhooks_urls_with_http_info(space, opts = {}) ⇒ Array<(WebhookURLListResponse, Integer, Hash)>

Returns WebhookURLListResponse data, response status code and response headers.

Parameters:

  • space (Integer)

    Specifies the ID of the space the operation should be executed in.

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

    the optional parameters

Options Hash (opts):

  • :after (Integer)

    Set to an object&#39;s ID to retrieve the page of objects coming immediately after the named object.

  • :before (Integer)

    Set to an object&#39;s ID to retrieve the page of objects coming immediately before the named object.

  • :expand (Array<String>)
  • :limit (Integer)

    A limit on the number of objects to be returned, between 1 and 100. Default is 10.

  • :order (SortingOrder)

    Specify to retrieve objects in chronological (ASC) or reverse chronological (DESC) order.

Returns:

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

    WebhookURLListResponse data, response status code and response headers



198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
# File 'lib/wallee-ruby-sdk/service/webhook_urls_service.rb', line 198

def get_webhooks_urls_with_http_info(space, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookURLsService.get_webhooks_urls ...'
  end
  # verify the required parameter 'space' is set
  if @api_client.config.client_side_validation && space.nil?
    fail ArgumentError, "Missing the required parameter 'space' when calling WebhookURLsService.get_webhooks_urls"
  end
  if @api_client.config.client_side_validation && !opts[:'after'].nil? && opts[:'after'] < 1
    fail ArgumentError, 'invalid value for "opts[:"after"]" when calling WebhookURLsService.get_webhooks_urls, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'before'].nil? && opts[:'before'] < 1
    fail ArgumentError, 'invalid value for "opts[:"before"]" when calling WebhookURLsService.get_webhooks_urls, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling WebhookURLsService.get_webhooks_urls, must be smaller than or equal to 100.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling WebhookURLsService.get_webhooks_urls, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/webhooks/urls'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'after'] = opts[:'after'] unless opts[:'after'].nil?
  query_params[:'before'] = opts[:'before'] unless opts[:'before'].nil?
  query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) unless opts[:'expand'].nil?
  query_params[:'limit'] = opts[:'limit'] unless opts[:'limit'].nil?
  query_params[:'order'] = opts[:'order'] unless opts[:'order'].nil?

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

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

  # connection timeout
  connection_timeout = @api_client.config.timeout

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

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

  new_options = opts.merge(
    :operation => :"WebhookURLsService.get_webhooks_urls",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET.to_sym.downcase, local_var_path, new_options, connection_timeout)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookURLsService#get_webhooks_urls\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end

#patch_webhooks_urls_bulk(space, webhook_url_update, opts = {}) ⇒ Array<RestApiBulkOperationResult>

Update multiple webhook URLs

Parameters:

  • space (Integer)

    Specifies the ID of the space the operation should be executed in.

  • webhook_url_update (Array<WebhookUrlUpdate>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



435
436
437
438
# File 'lib/wallee-ruby-sdk/service/webhook_urls_service.rb', line 435

def patch_webhooks_urls_bulk(space, webhook_url_update, opts = {})
  data, _status_code, _headers = patch_webhooks_urls_bulk_with_http_info(space, webhook_url_update, opts)
  data
end

#patch_webhooks_urls_bulk_with_http_info(space, webhook_url_update, opts = {}) ⇒ Array<(Array<RestApiBulkOperationResult>, Integer, Hash)>

Returns Array<RestApiBulkOperationResult> data, response status code and response headers.

Parameters:

  • space (Integer)

    Specifies the ID of the space the operation should be executed in.

  • webhook_url_update (Array<WebhookUrlUpdate>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    Array<RestApiBulkOperationResult> data, response status code and response headers



446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
# File 'lib/wallee-ruby-sdk/service/webhook_urls_service.rb', line 446

def patch_webhooks_urls_bulk_with_http_info(space, webhook_url_update, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookURLsService.patch_webhooks_urls_bulk ...'
  end
  # verify the required parameter 'space' is set
  if @api_client.config.client_side_validation && space.nil?
    fail ArgumentError, "Missing the required parameter 'space' when calling WebhookURLsService.patch_webhooks_urls_bulk"
  end
  # verify the required parameter 'webhook_url_update' is set
  if @api_client.config.client_side_validation && webhook_url_update.nil?
    fail ArgumentError, "Missing the required parameter 'webhook_url_update' when calling WebhookURLsService.patch_webhooks_urls_bulk"
  end
  # resource path
  local_var_path = '/webhooks/urls/bulk'

  # 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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  unless content_type.nil?
    header_params['Content-Type'] = content_type
  end
  header_params[:'Space'] = space

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

  # connection timeout
  connection_timeout = @api_client.config.timeout

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

  # return_type
  return_type = opts[:debug_return_type] || 'Array<RestApiBulkOperationResult>'

  new_options = opts.merge(
    :operation => :"WebhookURLsService.patch_webhooks_urls_bulk",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH.to_sym.downcase, local_var_path, new_options, connection_timeout)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookURLsService#patch_webhooks_urls_bulk\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end

#patch_webhooks_urls_id(id, space, webhook_url_update, opts = {}) ⇒ WebhookUrl

Update a webhook URL

Parameters:

  • id (Integer)
  • space (Integer)

    Specifies the ID of the space the operation should be executed in.

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

    the optional parameters

Options Hash (opts):

  • :expand (Array<String>)

Returns:



511
512
513
514
# File 'lib/wallee-ruby-sdk/service/webhook_urls_service.rb', line 511

def patch_webhooks_urls_id(id, space, webhook_url_update, opts = {})
  data, _status_code, _headers = patch_webhooks_urls_id_with_http_info(id, space, webhook_url_update, opts)
  data
end

#patch_webhooks_urls_id_with_http_info(id, space, webhook_url_update, opts = {}) ⇒ Array<(WebhookUrl, Integer, Hash)>

Returns WebhookUrl data, response status code and response headers.

Parameters:

  • id (Integer)
  • space (Integer)

    Specifies the ID of the space the operation should be executed in.

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

    the optional parameters

Options Hash (opts):

  • :expand (Array<String>)

Returns:

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

    WebhookUrl data, response status code and response headers



524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
# File 'lib/wallee-ruby-sdk/service/webhook_urls_service.rb', line 524

def patch_webhooks_urls_id_with_http_info(id, space, webhook_url_update, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookURLsService.patch_webhooks_urls_id ...'
  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 WebhookURLsService.patch_webhooks_urls_id"
  end
  # verify the required parameter 'space' is set
  if @api_client.config.client_side_validation && space.nil?
    fail ArgumentError, "Missing the required parameter 'space' when calling WebhookURLsService.patch_webhooks_urls_id"
  end
  # verify the required parameter 'webhook_url_update' is set
  if @api_client.config.client_side_validation && webhook_url_update.nil?
    fail ArgumentError, "Missing the required parameter 'webhook_url_update' when calling WebhookURLsService.patch_webhooks_urls_id"
  end
  # resource path
  local_var_path = '/webhooks/urls/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) unless opts[:'expand'].nil?

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

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

  # connection timeout
  connection_timeout = @api_client.config.timeout

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

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

  new_options = opts.merge(
    :operation => :"WebhookURLsService.patch_webhooks_urls_id",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH.to_sym.downcase, local_var_path, new_options, connection_timeout)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookURLsService#patch_webhooks_urls_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end

#post_webhooks_urls(space, webhook_url_create, opts = {}) ⇒ WebhookUrl

Create a webhook URL

Parameters:

  • space (Integer)

    Specifies the ID of the space the operation should be executed in.

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

    the optional parameters

Options Hash (opts):

  • :expand (Array<String>)

Returns:



593
594
595
596
# File 'lib/wallee-ruby-sdk/service/webhook_urls_service.rb', line 593

def post_webhooks_urls(space, webhook_url_create, opts = {})
  data, _status_code, _headers = post_webhooks_urls_with_http_info(space, webhook_url_create, opts)
  data
end

#post_webhooks_urls_bulk(space, webhook_url_create, opts = {}) ⇒ Array<RestApiBulkOperationResult>

Create multiple webhook URLs

Parameters:

  • space (Integer)

    Specifies the ID of the space the operation should be executed in.

  • webhook_url_create (Array<WebhookUrlCreate>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



669
670
671
672
# File 'lib/wallee-ruby-sdk/service/webhook_urls_service.rb', line 669

def post_webhooks_urls_bulk(space, webhook_url_create, opts = {})
  data, _status_code, _headers = post_webhooks_urls_bulk_with_http_info(space, webhook_url_create, opts)
  data
end

#post_webhooks_urls_bulk_with_http_info(space, webhook_url_create, opts = {}) ⇒ Array<(Array<RestApiBulkOperationResult>, Integer, Hash)>

Returns Array<RestApiBulkOperationResult> data, response status code and response headers.

Parameters:

  • space (Integer)

    Specifies the ID of the space the operation should be executed in.

  • webhook_url_create (Array<WebhookUrlCreate>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    Array<RestApiBulkOperationResult> data, response status code and response headers



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
723
724
725
726
727
728
729
730
731
732
733
734
735
# File 'lib/wallee-ruby-sdk/service/webhook_urls_service.rb', line 680

def post_webhooks_urls_bulk_with_http_info(space, webhook_url_create, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookURLsService.post_webhooks_urls_bulk ...'
  end
  # verify the required parameter 'space' is set
  if @api_client.config.client_side_validation && space.nil?
    fail ArgumentError, "Missing the required parameter 'space' when calling WebhookURLsService.post_webhooks_urls_bulk"
  end
  # verify the required parameter 'webhook_url_create' is set
  if @api_client.config.client_side_validation && webhook_url_create.nil?
    fail ArgumentError, "Missing the required parameter 'webhook_url_create' when calling WebhookURLsService.post_webhooks_urls_bulk"
  end
  # resource path
  local_var_path = '/webhooks/urls/bulk'

  # 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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  unless content_type.nil?
    header_params['Content-Type'] = content_type
  end
  header_params[:'Space'] = space

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

  # connection timeout
  connection_timeout = @api_client.config.timeout

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

  # return_type
  return_type = opts[:debug_return_type] || 'Array<RestApiBulkOperationResult>'

  new_options = opts.merge(
    :operation => :"WebhookURLsService.post_webhooks_urls_bulk",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST.to_sym.downcase, local_var_path, new_options, connection_timeout)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookURLsService#post_webhooks_urls_bulk\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end

#post_webhooks_urls_with_http_info(space, webhook_url_create, opts = {}) ⇒ Array<(WebhookUrl, Integer, Hash)>

Returns WebhookUrl data, response status code and response headers.

Parameters:

  • space (Integer)

    Specifies the ID of the space the operation should be executed in.

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

    the optional parameters

Options Hash (opts):

  • :expand (Array<String>)

Returns:

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

    WebhookUrl data, response status code and response headers



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
653
654
655
656
657
658
659
660
661
# File 'lib/wallee-ruby-sdk/service/webhook_urls_service.rb', line 605

def post_webhooks_urls_with_http_info(space, webhook_url_create, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhookURLsService.post_webhooks_urls ...'
  end
  # verify the required parameter 'space' is set
  if @api_client.config.client_side_validation && space.nil?
    fail ArgumentError, "Missing the required parameter 'space' when calling WebhookURLsService.post_webhooks_urls"
  end
  # verify the required parameter 'webhook_url_create' is set
  if @api_client.config.client_side_validation && webhook_url_create.nil?
    fail ArgumentError, "Missing the required parameter 'webhook_url_create' when calling WebhookURLsService.post_webhooks_urls"
  end
  # resource path
  local_var_path = '/webhooks/urls'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) unless opts[:'expand'].nil?

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

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

  # connection timeout
  connection_timeout = @api_client.config.timeout

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

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

  new_options = opts.merge(
    :operation => :"WebhookURLsService.post_webhooks_urls",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST.to_sym.downcase, local_var_path, new_options, connection_timeout)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhookURLsService#post_webhooks_urls\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end