Class: Wajub::WebhookEndpointsResource
- Inherits:
-
CrudResource
- Object
- BaseClient
- CrudResource
- Wajub::WebhookEndpointsResource
- Defined in:
- lib/wajub/resources.rb
Instance Attribute Summary
Attributes inherited from BaseClient
#api_key, #base_url, #idempotency_key_prefix, #last_request, #transport
Instance Method Summary collapse
-
#initialize(api_key, base_url, idempotency_key_prefix = 'wajub', transport: nil) ⇒ WebhookEndpointsResource
constructor
A new instance of WebhookEndpointsResource.
- #rotate_secret(id, options = nil) ⇒ Object
Methods inherited from CrudResource
#create, #delete, #list, #retrieve, #update
Methods inherited from BaseClient
#delete, #get, #post, #put, #request
Constructor Details
#initialize(api_key, base_url, idempotency_key_prefix = 'wajub', transport: nil) ⇒ WebhookEndpointsResource
Returns a new instance of WebhookEndpointsResource.
177 178 179 |
# File 'lib/wajub/resources.rb', line 177 def initialize(api_key, base_url, idempotency_key_prefix = 'wajub', transport: nil) super(api_key, base_url, 'webhooks', 'endpoint', 'endpoints', idempotency_key_prefix, transport: transport) end |
Instance Method Details
#rotate_secret(id, options = nil) ⇒ Object
181 182 183 |
# File 'lib/wajub/resources.rb', line 181 def rotate_secret(id, = nil) HttpUtils.pick_resource(post("/webhooks/#{URI.encode_www_form_component(id)}/rotate-secret", nil, ), 'endpoint') end |