Class: Lago::Api::Resources::WebhookEndpoint

Inherits:
Base
  • Object
show all
Defined in:
lib/lago/api/resources/webhook_endpoint.rb

Instance Attribute Summary

Attributes inherited from Base

#client

Instance Method Summary collapse

Methods inherited from Base

#create, #destroy, #get, #get_all, #initialize, #update

Constructor Details

This class inherits a constructor from Lago::Api::Resources::Base

Instance Method Details

#api_resourceObject



9
10
11
# File 'lib/lago/api/resources/webhook_endpoint.rb', line 9

def api_resource
  'webhook_endpoints'
end

#root_nameObject



13
14
15
# File 'lib/lago/api/resources/webhook_endpoint.rb', line 13

def root_name
  'webhook_endpoint'
end

#whitelist_params(params) ⇒ Object



17
18
19
20
21
22
23
24
# File 'lib/lago/api/resources/webhook_endpoint.rb', line 17

def whitelist_params(params)
  {
    root_name => {
      webhook_url: params[:webhook_url],
      signature_algo: params[:signature_algo],
    }.compact,
  }
end