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
33 34 35 |
# File 'lib/contentful/management/webhook_health.rb', line 33 def self.all(*) fail 'Not supported' end |
.create ⇒ Object
Not supported
28 29 30 |
# File 'lib/contentful/management/webhook_health.rb', line 28 def self.create(*) fail 'Not supported' end |
.find(client, space_id, webhook_id) ⇒ Contentful::Management::WebhookHealth
Gets a webhook’s health details by ID
23 24 25 |
# File 'lib/contentful/management/webhook_health.rb', line 23 def self.find(client, space_id, webhook_id) ClientWebhookHealthMethodsFactory.new(client, space_id).find(webhook_id) end |
Instance Method Details
#destroy ⇒ Object
Not supported
51 52 53 |
# File 'lib/contentful/management/webhook_health.rb', line 51 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.
71 72 73 |
# File 'lib/contentful/management/webhook_health.rb', line 71 def errors? total != healthy end |
#healthy ⇒ Object
Returns the amount of healthy calls made by the webhook.
66 67 68 |
# File 'lib/contentful/management/webhook_health.rb', line 66 def healthy calls['healthy'] end |
#healthy? ⇒ Boolean
Returns whether or not all the webhook calls on the last 30 days were successful.
76 77 78 |
# File 'lib/contentful/management/webhook_health.rb', line 76 def healthy? total == healthy end |
#total ⇒ Object
Returns the total calls made by the webhook.
61 62 63 |
# File 'lib/contentful/management/webhook_health.rb', line 61 def total calls['total'] end |
#update ⇒ Object
Not supported
56 57 58 |
# File 'lib/contentful/management/webhook_health.rb', line 56 def update(*) fail 'Not supported' end |