class Pixela::Webhook
Attributes
client[R]
@!attribute [r] client @return [Pixela::Client]
webhook_hash[R]
@!attribute [r] webhook_hash
@return [String]
Public Class Methods
new(client:, webhook_hash:)
click to toggle source
@param client [Pixela::Client] @param webhook_hash
[String]
# File lib/pixela/webhook.rb, line 13 def initialize(client:, webhook_hash:) @client = client @webhook_hash = webhook_hash end
Public Instance Methods
delete()
click to toggle source
Delete the registered Webhook
.
@return [Pixela::Response]
@raise [Pixela::PixelaError] API is failed
@see docs.pixe.la/entry/delete-webhook
@example
client.webhook("<webhookHash>").delete
# File lib/pixela/webhook.rb, line 42 def delete client.delete_webhook(webhook_hash: webhook_hash) end
invoke()
click to toggle source
Invoke the webhook registered in advance.
@return [Pixela::Response]
@raise [Pixela::PixelaError] API is failed
@see docs.pixe.la/entry/invoke-webhook
@example
client.webhook("<webhookHash>").invoke
# File lib/pixela/webhook.rb, line 28 def invoke client.invoke_webhook(webhook_hash: webhook_hash) end