Class: Carbon::WebhooksApi

Inherits:
Object
  • Object
show all
Defined in:
lib/carbon_ruby_sdk/api/webhooks_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ WebhooksApi

Returns a new instance of WebhooksApi.



15
16
17
# File 'lib/carbon_ruby_sdk/api/webhooks_api.rb', line 15

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



13
14
15
# File 'lib/carbon_ruby_sdk/api/webhooks_api.rb', line 13

def api_client
  @api_client
end

Instance Method Details

#add_url(url:, extra: {}) ⇒ Object

Add Webhook Url

Parameters:

  • url (String)
  • body (AddWebhookProps)
  • extra (Hash) (defaults to: {})

    additional parameters to pass along through :header_params, :query_params, or parameter name



24
25
26
27
28
29
30
# File 'lib/carbon_ruby_sdk/api/webhooks_api.rb', line 24

def add_url(url:, extra: {})
  _body = {}
  _body[:url] = url if url != SENTINEL
  add_webhook_props = _body
  api_response = add_url_with_http_info_impl(add_webhook_props, extra)
  api_response.data
end

#add_url_with_http_info(url:, extra: {}) ⇒ Object

Add Webhook Url

Parameters:

  • url (String)
  • body (AddWebhookProps)
  • extra (Hash) (defaults to: {})

    additional parameters to pass along through :header_params, :query_params, or parameter name



37
38
39
40
41
42
# File 'lib/carbon_ruby_sdk/api/webhooks_api.rb', line 37

def add_url_with_http_info(url:, extra: {})
  _body = {}
  _body[:url] = url if url != SENTINEL
  add_webhook_props = _body
  add_url_with_http_info_impl(add_webhook_props, extra)
end

#delete_url(webhook_id:, extra: {}) ⇒ Object

Delete Webhook Url

Parameters:

  • webhook_id (Integer)
  • extra (Hash) (defaults to: {})

    additional parameters to pass along through :header_params, :query_params, or parameter name



115
116
117
118
# File 'lib/carbon_ruby_sdk/api/webhooks_api.rb', line 115

def delete_url(webhook_id:, extra: {})
  api_response = delete_url_with_http_info_impl(webhook_id, extra)
  api_response.data
end

#delete_url_with_http_info(webhook_id:, extra: {}) ⇒ Object

Delete Webhook Url

Parameters:

  • webhook_id (Integer)
  • extra (Hash) (defaults to: {})

    additional parameters to pass along through :header_params, :query_params, or parameter name



124
125
126
# File 'lib/carbon_ruby_sdk/api/webhooks_api.rb', line 124

def delete_url_with_http_info(webhook_id:, extra: {})
  delete_url_with_http_info_impl(webhook_id, extra)
end

#urls(pagination: SENTINEL, order_by: SENTINEL, order_dir: SENTINEL, filters: SENTINEL, extra: {}) ⇒ Object

Webhook Urls

Parameters:

  • pagination (Pagination) (defaults to: SENTINEL)
  • order_by (WebhookOrderByColumns) (defaults to: SENTINEL)
  • order_dir (OrderDir) (defaults to: SENTINEL)
  • filters (WebhookFilters) (defaults to: SENTINEL)
  • body (WebhookQueryInput)
  • extra (Hash) (defaults to: {})

    additional parameters to pass along through :header_params, :query_params, or parameter name



198
199
200
201
202
203
204
205
206
207
# File 'lib/carbon_ruby_sdk/api/webhooks_api.rb', line 198

def urls(pagination: SENTINEL, order_by: SENTINEL, order_dir: SENTINEL, filters: SENTINEL, extra: {})
  _body = {}
  _body[:pagination] = pagination if pagination != SENTINEL
  _body[:order_by] = order_by if order_by != SENTINEL
  _body[:order_dir] = order_dir if order_dir != SENTINEL
  _body[:filters] = filters if filters != SENTINEL
  webhook_query_input = _body
  api_response = urls_with_http_info_impl(webhook_query_input, extra)
  api_response.data
end

#urls_with_http_info(pagination: SENTINEL, order_by: SENTINEL, order_dir: SENTINEL, filters: SENTINEL, extra: {}) ⇒ Object

Webhook Urls

Parameters:

  • pagination (Pagination) (defaults to: SENTINEL)
  • order_by (WebhookOrderByColumns) (defaults to: SENTINEL)
  • order_dir (OrderDir) (defaults to: SENTINEL)
  • filters (WebhookFilters) (defaults to: SENTINEL)
  • body (WebhookQueryInput)
  • extra (Hash) (defaults to: {})

    additional parameters to pass along through :header_params, :query_params, or parameter name



217
218
219
220
221
222
223
224
225
# File 'lib/carbon_ruby_sdk/api/webhooks_api.rb', line 217

def urls_with_http_info(pagination: SENTINEL, order_by: SENTINEL, order_dir: SENTINEL, filters: SENTINEL, extra: {})
  _body = {}
  _body[:pagination] = pagination if pagination != SENTINEL
  _body[:order_by] = order_by if order_by != SENTINEL
  _body[:order_dir] = order_dir if order_dir != SENTINEL
  _body[:filters] = filters if filters != SENTINEL
  webhook_query_input = _body
  urls_with_http_info_impl(webhook_query_input, extra)
end