Class: Pulsetic::V3
- Inherits:
-
Integration
- Object
- Integration
- Pulsetic::V3
- Defined in:
- app/models/pager_tree/integrations/pulsetic/v3.rb
Constant Summary collapse
- OPTIONS =
[]
Instance Method Summary collapse
- #adapter_action ⇒ Object
- #adapter_incoming_can_defer? ⇒ Boolean
- #adapter_process_create ⇒ Object
- #adapter_supports_incoming? ⇒ Boolean
- #adapter_supports_outgoing? ⇒ Boolean
- #adapter_thirdparty_id ⇒ Object
Instance Method Details
#adapter_action ⇒ Object
27 28 29 30 31 32 33 34 35 36 |
# File 'app/models/pager_tree/integrations/pulsetic/v3.rb', line 27 def adapter_action case _alert_type when "monitor_offline", "certificate_expires_soon" :create when "monitor_online" :resolve else :other end end |
#adapter_incoming_can_defer? ⇒ Boolean
17 18 19 |
# File 'app/models/pager_tree/integrations/pulsetic/v3.rb', line 17 def adapter_incoming_can_defer? true end |
#adapter_process_create ⇒ Object
38 39 40 41 42 43 44 |
# File 'app/models/pager_tree/integrations/pulsetic/v3.rb', line 38 def adapter_process_create Alert.new( title: _title, thirdparty_id: adapter_thirdparty_id, additional_data: _additional_datums ) end |
#adapter_supports_incoming? ⇒ Boolean
9 10 11 |
# File 'app/models/pager_tree/integrations/pulsetic/v3.rb', line 9 def adapter_supports_incoming? true end |
#adapter_supports_outgoing? ⇒ Boolean
13 14 15 |
# File 'app/models/pager_tree/integrations/pulsetic/v3.rb', line 13 def adapter_supports_outgoing? false end |
#adapter_thirdparty_id ⇒ Object
21 22 23 24 25 |
# File 'app/models/pager_tree/integrations/pulsetic/v3.rb', line 21 def adapter_thirdparty_id id = adapter_incoming_request_params.dig("monitor", "id") typ = (_alert_type == "certificate_expires_soon") ? "certificate" : "monitor" "#{id}_#{typ}" end |