Class: Contentful::Management::WebhookHealth
- Inherits:
-
Object
- Object
- Contentful::Management::WebhookHealth
- Includes:
- Resource, Resource::Refresher, Resource::SystemProperties
- Defined in:
- lib/contentful/management/webhook_health.rb
Overview
Resource class for WebhookHealth.
Instance Attribute Summary
Attributes included from Resource::SystemProperties
Attributes included from Resource
#client, #properties, #raw_object, #request
Class Method Summary collapse
-
.all ⇒ Object
Not supported.
-
.create ⇒ Object
Not supported.
-
.find(client, space_id, webhook_id) ⇒ Contentful::Management::WebhookHealth
Gets a webhook’s health details by ID.
Instance Method Summary collapse
-
#destroy ⇒ Object
Not supported.
-
#errors? ⇒ Boolean
Returns wether or not there was an error on the webhook calls on the last 30 days.
-
#healthy ⇒ Object
Returns the amount of healthy calls made by the webhook.
-
#healthy? ⇒ Boolean
Returns whether or not all the webhook calls on the last 30 days were successful.
-
#total ⇒ Object
Returns the total calls made by the webhook.
-
#update ⇒ Object
Not supported.
Methods included from Resource::Refresher
Methods included from Resource
#array?, #default_locale, #environment_id, #fields, #nested_locale_fields?, #resource?, #save, #sys
Class Method Details
.all ⇒ Object
Not supported
31 32 33 |
# File 'lib/contentful/management/webhook_health.rb', line 31 def self.all(*) fail 'Not supported' end |
.create ⇒ Object
Not supported
26 27 28 |
# File 'lib/contentful/management/webhook_health.rb', line 26 def self.create(*) fail 'Not supported' end |
.find(client, space_id, webhook_id) ⇒ Contentful::Management::WebhookHealth
Gets a webhook’s health details by ID
21 22 23 |
# File 'lib/contentful/management/webhook_health.rb', line 21 def self.find(client, space_id, webhook_id) ClientWebhookHealthMethodsFactory.new(client, space_id).find(webhook_id) end |
Instance Method Details
#destroy ⇒ Object
Not supported
49 50 51 |
# File 'lib/contentful/management/webhook_health.rb', line 49 def destroy fail 'Not supported' end |
#errors? ⇒ Boolean
Returns wether or not there was an error on the webhook calls on the last 30 days.
69 70 71 |
# File 'lib/contentful/management/webhook_health.rb', line 69 def errors? total != healthy end |
#healthy ⇒ Object
Returns the amount of healthy calls made by the webhook.
64 65 66 |
# File 'lib/contentful/management/webhook_health.rb', line 64 def healthy calls['healthy'] end |
#healthy? ⇒ Boolean
Returns whether or not all the webhook calls on the last 30 days were successful.
74 75 76 |
# File 'lib/contentful/management/webhook_health.rb', line 74 def healthy? total == healthy end |
#total ⇒ Object
Returns the total calls made by the webhook.
59 60 61 |
# File 'lib/contentful/management/webhook_health.rb', line 59 def total calls['total'] end |
#update ⇒ Object
Not supported
54 55 56 |
# File 'lib/contentful/management/webhook_health.rb', line 54 def update(*) fail 'Not supported' end |