Class: Spage::Incident
- Inherits:
-
Object
- Object
- Spage::Incident
- Defined in:
- lib/spage/resources/incident.rb
Overview
Page resource in statuspage.io
Instance Attribute Summary collapse
-
#auto_transition_deliver_notifications_at_end ⇒ Object
Returns the value of attribute auto_transition_deliver_notifications_at_end.
-
#auto_transition_deliver_notifications_at_start ⇒ Object
Returns the value of attribute auto_transition_deliver_notifications_at_start.
-
#auto_transition_to_maintenance_state ⇒ Object
Returns the value of attribute auto_transition_to_maintenance_state.
-
#auto_transition_to_operational_state ⇒ Object
Returns the value of attribute auto_transition_to_operational_state.
-
#auto_tweet_at_beginning ⇒ Object
Returns the value of attribute auto_tweet_at_beginning.
-
#auto_tweet_on_completion ⇒ Object
Returns the value of attribute auto_tweet_on_completion.
-
#auto_tweet_on_creation ⇒ Object
Returns the value of attribute auto_tweet_on_creation.
-
#auto_tweet_one_hour_before ⇒ Object
Returns the value of attribute auto_tweet_one_hour_before.
-
#backfill_date ⇒ Object
Returns the value of attribute backfill_date.
-
#backfilled ⇒ Object
Returns the value of attribute backfilled.
-
#body ⇒ Object
Returns the value of attribute body.
-
#component_ids ⇒ Object
Returns the value of attribute component_ids.
-
#components ⇒ Object
Returns the value of attribute components.
-
#created_at ⇒ Object
readonly
rubocop: disable Layout/LineLength.
-
#deliver_notifications ⇒ Object
Returns the value of attribute deliver_notifications.
-
#id ⇒ Object
readonly
rubocop: disable Layout/LineLength.
-
#impact ⇒ Object
readonly
rubocop: disable Layout/LineLength.
-
#impact_override ⇒ Object
Returns the value of attribute impact_override.
-
#incident_updates ⇒ Object
readonly
rubocop: disable Layout/LineLength.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#monitoring_at ⇒ Object
readonly
rubocop: disable Layout/LineLength.
-
#name ⇒ Object
Returns the value of attribute name.
-
#page_id ⇒ Object
readonly
rubocop: disable Layout/LineLength.
-
#postmortem_body ⇒ Object
readonly
rubocop: disable Layout/LineLength.
-
#postmortem_body_last_updated_at ⇒ Object
readonly
rubocop: disable Layout/LineLength.
-
#postmortem_ignored ⇒ Object
readonly
rubocop: disable Layout/LineLength.
-
#postmortem_notified_subscribers ⇒ Object
readonly
rubocop: disable Layout/LineLength.
-
#postmortem_notified_twitter ⇒ Object
readonly
rubocop: disable Layout/LineLength.
-
#postmortem_published_at ⇒ Object
readonly
rubocop: disable Layout/LineLength.
-
#resolved_at ⇒ Object
readonly
rubocop: disable Layout/LineLength.
-
#scheduled_auto_completed ⇒ Object
Returns the value of attribute scheduled_auto_completed.
-
#scheduled_auto_in_progress ⇒ Object
Returns the value of attribute scheduled_auto_in_progress.
-
#scheduled_auto_transition ⇒ Object
Returns the value of attribute scheduled_auto_transition.
-
#scheduled_for ⇒ Object
Returns the value of attribute scheduled_for.
-
#scheduled_remind_prior ⇒ Object
Returns the value of attribute scheduled_remind_prior.
-
#scheduled_until ⇒ Object
Returns the value of attribute scheduled_until.
-
#shortlink ⇒ Object
readonly
rubocop: disable Layout/LineLength.
-
#status ⇒ Object
Returns the value of attribute status.
-
#updated_at ⇒ Object
readonly
rubocop: disable Layout/LineLength.
Instance Method Summary collapse
-
#initialize(attrs) ⇒ Incident
constructor
rubocop: disable Metrics/MethodLength, Metrics/AbcSize, Layout/LineLength.
Constructor Details
#initialize(attrs) ⇒ Incident
rubocop: disable Metrics/MethodLength, Metrics/AbcSize, Layout/LineLength
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/spage/resources/incident.rb', line 8 def initialize(attrs) @id = attrs['id'] @components = attrs['components'] # Array of Component @impact = attrs['impact'] @impact_override = attrs['impact_override'] @incident_updates = attrs['incident_updates'] # Array of IncidentUpdate @metadata = attrs['metadata'] # Hash of values @name = attrs['name'] @page_id = attrs['page_id'] @postmortem_body = attrs['postmortem_body'] @postmortem_body_last_updated_at = attrs['postmortem_body_last_updated_at'] @postmortem_ignored = attrs['postmortem_ignored'] @postmortem_notified_subscribers = attrs['postmortem_notified_subscribers'] @postmortem_notified_twitter = attrs['postmortem_notified_twitter'] @postmortem_published_at = attrs['postmortem_published_at'] @scheduled_auto_completed = attrs['scheduled_auto_completed'] @scheduled_auto_in_progress = attrs['scheduled_auto_in_progress'] @scheduled_for = attrs['scheduled_for'] @scheduled_remind_prior = attrs['scheduled_remind_prior'] @scheduled_reminded_at = date_parse(attrs['scheduled_reminded_at']) @scheduled_until = attrs['scheduled_until'] @shortlink = attrs['shortlink'] @status = attrs['status'] @monitoring_at = date_parse(attrs['monitoring_at']) @resolved_at = date_parse(attrs['resolved_at']) @created_at = date_parse(attrs['created_at']) @updated_at = date_parse(attrs['updated_at']) # vars only used to update/create incident @deliver_notifications = attrs['deliver_notifications'] @auto_transition_deliver_notifications_at_end = attrs['auto_transition_deliver_notifications_at_end'] @auto_transition_deliver_notifications_at_start = attrs['auto_transition_deliver_notifications_at_start'] @auto_transition_to_maintenance_state = attrs['auto_transition_to_maintenance_state'] @auto_transition_to_operational_state = attrs['auto_transition_to_operational_state'] @auto_tweet_at_beginning = attrs['auto_tweet_at_beginning'] @auto_tweet_on_completion = attrs['auto_tweet_on_completion'] @auto_tweet_on_creation = attrs['auto_tweet_on_creation'] @auto_tweet_one_hour_before = attrs['auto_tweet_one_hour_before'] @backfill_date = attrs['backfill_date'] @backfilled = attrs['backfilled'] @body = attrs['body'] @component_ids = attrs['component_ids'] @scheduled_auto_transition = attrs['scheduled_auto_transition'] end |
Instance Attribute Details
#auto_transition_deliver_notifications_at_end ⇒ Object
Returns the value of attribute auto_transition_deliver_notifications_at_end.
57 58 59 |
# File 'lib/spage/resources/incident.rb', line 57 def auto_transition_deliver_notifications_at_end @auto_transition_deliver_notifications_at_end end |
#auto_transition_deliver_notifications_at_start ⇒ Object
Returns the value of attribute auto_transition_deliver_notifications_at_start.
57 58 59 |
# File 'lib/spage/resources/incident.rb', line 57 def auto_transition_deliver_notifications_at_start @auto_transition_deliver_notifications_at_start end |
#auto_transition_to_maintenance_state ⇒ Object
Returns the value of attribute auto_transition_to_maintenance_state.
57 58 59 |
# File 'lib/spage/resources/incident.rb', line 57 def auto_transition_to_maintenance_state @auto_transition_to_maintenance_state end |
#auto_transition_to_operational_state ⇒ Object
Returns the value of attribute auto_transition_to_operational_state.
57 58 59 |
# File 'lib/spage/resources/incident.rb', line 57 def auto_transition_to_operational_state @auto_transition_to_operational_state end |
#auto_tweet_at_beginning ⇒ Object
Returns the value of attribute auto_tweet_at_beginning.
57 58 59 |
# File 'lib/spage/resources/incident.rb', line 57 def auto_tweet_at_beginning @auto_tweet_at_beginning end |
#auto_tweet_on_completion ⇒ Object
Returns the value of attribute auto_tweet_on_completion.
57 58 59 |
# File 'lib/spage/resources/incident.rb', line 57 def auto_tweet_on_completion @auto_tweet_on_completion end |
#auto_tweet_on_creation ⇒ Object
Returns the value of attribute auto_tweet_on_creation.
57 58 59 |
# File 'lib/spage/resources/incident.rb', line 57 def auto_tweet_on_creation @auto_tweet_on_creation end |
#auto_tweet_one_hour_before ⇒ Object
Returns the value of attribute auto_tweet_one_hour_before.
57 58 59 |
# File 'lib/spage/resources/incident.rb', line 57 def auto_tweet_one_hour_before @auto_tweet_one_hour_before end |
#backfill_date ⇒ Object
Returns the value of attribute backfill_date.
57 58 59 |
# File 'lib/spage/resources/incident.rb', line 57 def backfill_date @backfill_date end |
#backfilled ⇒ Object
Returns the value of attribute backfilled.
57 58 59 |
# File 'lib/spage/resources/incident.rb', line 57 def backfilled @backfilled end |
#body ⇒ Object
Returns the value of attribute body.
57 58 59 |
# File 'lib/spage/resources/incident.rb', line 57 def body @body end |
#component_ids ⇒ Object
Returns the value of attribute component_ids.
57 58 59 |
# File 'lib/spage/resources/incident.rb', line 57 def component_ids @component_ids end |
#components ⇒ Object
Returns the value of attribute components.
57 58 59 |
# File 'lib/spage/resources/incident.rb', line 57 def components @components end |
#created_at ⇒ Object (readonly)
rubocop: disable Layout/LineLength
55 56 57 |
# File 'lib/spage/resources/incident.rb', line 55 def created_at @created_at end |
#deliver_notifications ⇒ Object
Returns the value of attribute deliver_notifications.
57 58 59 |
# File 'lib/spage/resources/incident.rb', line 57 def deliver_notifications @deliver_notifications end |
#id ⇒ Object (readonly)
rubocop: disable Layout/LineLength
55 56 57 |
# File 'lib/spage/resources/incident.rb', line 55 def id @id end |
#impact ⇒ Object (readonly)
rubocop: disable Layout/LineLength
55 56 57 |
# File 'lib/spage/resources/incident.rb', line 55 def impact @impact end |
#impact_override ⇒ Object
Returns the value of attribute impact_override.
57 58 59 |
# File 'lib/spage/resources/incident.rb', line 57 def impact_override @impact_override end |
#incident_updates ⇒ Object (readonly)
rubocop: disable Layout/LineLength
55 56 57 |
# File 'lib/spage/resources/incident.rb', line 55 def incident_updates @incident_updates end |
#metadata ⇒ Object
Returns the value of attribute metadata.
57 58 59 |
# File 'lib/spage/resources/incident.rb', line 57 def @metadata end |
#monitoring_at ⇒ Object (readonly)
rubocop: disable Layout/LineLength
55 56 57 |
# File 'lib/spage/resources/incident.rb', line 55 def monitoring_at @monitoring_at end |
#name ⇒ Object
Returns the value of attribute name.
57 58 59 |
# File 'lib/spage/resources/incident.rb', line 57 def name @name end |
#page_id ⇒ Object (readonly)
rubocop: disable Layout/LineLength
55 56 57 |
# File 'lib/spage/resources/incident.rb', line 55 def page_id @page_id end |
#postmortem_body ⇒ Object (readonly)
rubocop: disable Layout/LineLength
55 56 57 |
# File 'lib/spage/resources/incident.rb', line 55 def postmortem_body @postmortem_body end |
#postmortem_body_last_updated_at ⇒ Object (readonly)
rubocop: disable Layout/LineLength
55 56 57 |
# File 'lib/spage/resources/incident.rb', line 55 def postmortem_body_last_updated_at @postmortem_body_last_updated_at end |
#postmortem_ignored ⇒ Object (readonly)
rubocop: disable Layout/LineLength
55 56 57 |
# File 'lib/spage/resources/incident.rb', line 55 def postmortem_ignored @postmortem_ignored end |
#postmortem_notified_subscribers ⇒ Object (readonly)
rubocop: disable Layout/LineLength
55 56 57 |
# File 'lib/spage/resources/incident.rb', line 55 def postmortem_notified_subscribers @postmortem_notified_subscribers end |
#postmortem_notified_twitter ⇒ Object (readonly)
rubocop: disable Layout/LineLength
55 56 57 |
# File 'lib/spage/resources/incident.rb', line 55 def postmortem_notified_twitter @postmortem_notified_twitter end |
#postmortem_published_at ⇒ Object (readonly)
rubocop: disable Layout/LineLength
55 56 57 |
# File 'lib/spage/resources/incident.rb', line 55 def postmortem_published_at @postmortem_published_at end |
#resolved_at ⇒ Object (readonly)
rubocop: disable Layout/LineLength
55 56 57 |
# File 'lib/spage/resources/incident.rb', line 55 def resolved_at @resolved_at end |
#scheduled_auto_completed ⇒ Object
Returns the value of attribute scheduled_auto_completed.
57 58 59 |
# File 'lib/spage/resources/incident.rb', line 57 def scheduled_auto_completed @scheduled_auto_completed end |
#scheduled_auto_in_progress ⇒ Object
Returns the value of attribute scheduled_auto_in_progress.
57 58 59 |
# File 'lib/spage/resources/incident.rb', line 57 def scheduled_auto_in_progress @scheduled_auto_in_progress end |
#scheduled_auto_transition ⇒ Object
Returns the value of attribute scheduled_auto_transition.
57 58 59 |
# File 'lib/spage/resources/incident.rb', line 57 def scheduled_auto_transition @scheduled_auto_transition end |
#scheduled_for ⇒ Object
Returns the value of attribute scheduled_for.
57 58 59 |
# File 'lib/spage/resources/incident.rb', line 57 def scheduled_for @scheduled_for end |
#scheduled_remind_prior ⇒ Object
Returns the value of attribute scheduled_remind_prior.
57 58 59 |
# File 'lib/spage/resources/incident.rb', line 57 def scheduled_remind_prior @scheduled_remind_prior end |
#scheduled_until ⇒ Object
Returns the value of attribute scheduled_until.
57 58 59 |
# File 'lib/spage/resources/incident.rb', line 57 def scheduled_until @scheduled_until end |
#shortlink ⇒ Object (readonly)
rubocop: disable Layout/LineLength
55 56 57 |
# File 'lib/spage/resources/incident.rb', line 55 def shortlink @shortlink end |
#status ⇒ Object
Returns the value of attribute status.
57 58 59 |
# File 'lib/spage/resources/incident.rb', line 57 def status @status end |
#updated_at ⇒ Object (readonly)
rubocop: disable Layout/LineLength
55 56 57 |
# File 'lib/spage/resources/incident.rb', line 55 def updated_at @updated_at end |