Class: Pixela::Webhook
- Inherits:
-
Object
- Object
- Pixela::Webhook
- Defined in:
- lib/pixela/webhook.rb
Instance Attribute Summary collapse
- #client ⇒ Pixela::Client readonly
- #webhook_hash ⇒ String readonly
Instance Method Summary collapse
-
#delete ⇒ Pixela::Response
Delete the registered Webhook.
-
#initialize(client:, webhook_hash:) ⇒ Webhook
constructor
A new instance of Webhook.
-
#invoke ⇒ Pixela::Response
Invoke the webhook registered in advance.
Constructor Details
#initialize(client:, webhook_hash:) ⇒ Webhook
Returns a new instance of Webhook.
13 14 15 16 |
# File 'lib/pixela/webhook.rb', line 13 def initialize(client:, webhook_hash:) @client = client @webhook_hash = webhook_hash end |
Instance Attribute Details
#client ⇒ Pixela::Client (readonly)
5 6 7 |
# File 'lib/pixela/webhook.rb', line 5 def client @client end |
#webhook_hash ⇒ String (readonly)
9 10 11 |
# File 'lib/pixela/webhook.rb', line 9 def webhook_hash @webhook_hash end |
Instance Method Details
#delete ⇒ Pixela::Response
Delete the registered Webhook.
42 43 44 |
# File 'lib/pixela/webhook.rb', line 42 def delete client.delete_webhook(webhook_hash: webhook_hash) end |
#invoke ⇒ Pixela::Response
Invoke the webhook registered in advance.
28 29 30 |
# File 'lib/pixela/webhook.rb', line 28 def invoke client.invoke_webhook(webhook_hash: webhook_hash) end |