Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add operational webhook endpoint API to the client libs #1502

Merged
merged 8 commits into from
Nov 6, 2024
Prev Previous commit
Next Next commit
ruby: Add operational webhook endpoint API
  • Loading branch information
svix-jplatte committed Nov 5, 2024
commit f5ae0b2cdf1670bfa220f700c8bf7a3c81a737d8
37 changes: 37 additions & 0 deletions ruby/lib/svix/operational_webhook_endpoint_api.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# frozen_string_literal: true

module Svix
class OperationalWebhookEndpointAPI
def initialize(api_client)
@api = OperationalWebhookEndpointApi.new(api_client)
end

def list(options = {})
return @api.v1_endpoint_list(options)
end

def create(endpoint_in, options = {})
return @api.v1_endpoint_create(endpoint_in, options)
end

def get(endpoint_id)
return @api.v1_endpoint_get(endpoint_id)
end

def update(endpoint_id, endpoint_update)
return @api.v1_endpoint_update(endpoint_id, endpoint_update)
end

def delete(endpoint_id)
return @api.v1_endpoint_delete(endpoint_id)
end

def get_secret(endpoint_id)
return @api.v1_endpoint_get_secret(endpoint_id)
end

def rotate_secret(endpoint_id, endpoint_secret_rotate_in, options = {})
return @api.v1_endpoint_rotate_secret(endpoint_id, endpoint_secret_rotate_in, options)
end
end
end