Class: Urbanairship::Automations::Pipeline
- Inherits:
-
Object
- Object
- Urbanairship::Automations::Pipeline
- Defined in:
- lib/urbanairship/automations/pipeline.rb
Constant Summary
Constants included from Common
Instance Attribute Summary collapse
-
#activation_time ⇒ Object
Returns the value of attribute activation_time.
-
#cancellation_trigger ⇒ Object
Returns the value of attribute cancellation_trigger.
-
#condition ⇒ Object
Returns the value of attribute condition.
-
#constraint ⇒ Object
Returns the value of attribute constraint.
-
#creation_time ⇒ Object
Returns the value of attribute creation_time.
-
#deactivation_time ⇒ Object
Returns the value of attribute deactivation_time.
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#historical_trigger ⇒ Object
Returns the value of attribute historical_trigger.
-
#immediate_trigger ⇒ Object
Returns the value of attribute immediate_trigger.
-
#last_modified_time ⇒ Object
Returns the value of attribute last_modified_time.
-
#name ⇒ Object
Returns the value of attribute name.
-
#outcome ⇒ Object
Returns the value of attribute outcome.
-
#status ⇒ Object
Returns the value of attribute status.
-
#timing ⇒ Object
Returns the value of attribute timing.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(client: required('client')) ⇒ Pipeline
constructor
A new instance of Pipeline.
- #payload ⇒ Object
Methods included from Loggable
create_logger, logger, #logger
Methods included from Common
#apid_path, #channel_path, #compact_helper, #create_and_send_path, #custom_events_path, #device_token_path, #experiments_path, #lists_path, #named_users_path, #open_channel_path, #pipelines_path, #push_path, #reports_path, #required, #schedules_path, #segments_path, #tag_lists_path, #try_helper
Constructor Details
#initialize(client: required('client')) ⇒ Pipeline
Returns a new instance of Pipeline.
24 25 26 |
# File 'lib/urbanairship/automations/pipeline.rb', line 24 def initialize(client: required('client')) @client = client end |
Instance Attribute Details
#activation_time ⇒ Object
Returns the value of attribute activation_time.
8 9 10 |
# File 'lib/urbanairship/automations/pipeline.rb', line 8 def activation_time @activation_time end |
#cancellation_trigger ⇒ Object
Returns the value of attribute cancellation_trigger.
8 9 10 |
# File 'lib/urbanairship/automations/pipeline.rb', line 8 def cancellation_trigger @cancellation_trigger end |
#condition ⇒ Object
Returns the value of attribute condition.
8 9 10 |
# File 'lib/urbanairship/automations/pipeline.rb', line 8 def condition @condition end |
#constraint ⇒ Object
Returns the value of attribute constraint.
8 9 10 |
# File 'lib/urbanairship/automations/pipeline.rb', line 8 def constraint @constraint end |
#creation_time ⇒ Object
Returns the value of attribute creation_time.
8 9 10 |
# File 'lib/urbanairship/automations/pipeline.rb', line 8 def creation_time @creation_time end |
#deactivation_time ⇒ Object
Returns the value of attribute deactivation_time.
8 9 10 |
# File 'lib/urbanairship/automations/pipeline.rb', line 8 def deactivation_time @deactivation_time end |
#enabled ⇒ Object
Returns the value of attribute enabled.
8 9 10 |
# File 'lib/urbanairship/automations/pipeline.rb', line 8 def enabled @enabled end |
#historical_trigger ⇒ Object
Returns the value of attribute historical_trigger.
8 9 10 |
# File 'lib/urbanairship/automations/pipeline.rb', line 8 def historical_trigger @historical_trigger end |
#immediate_trigger ⇒ Object
Returns the value of attribute immediate_trigger.
8 9 10 |
# File 'lib/urbanairship/automations/pipeline.rb', line 8 def immediate_trigger @immediate_trigger end |
#last_modified_time ⇒ Object
Returns the value of attribute last_modified_time.
8 9 10 |
# File 'lib/urbanairship/automations/pipeline.rb', line 8 def last_modified_time @last_modified_time end |
#name ⇒ Object
Returns the value of attribute name.
8 9 10 |
# File 'lib/urbanairship/automations/pipeline.rb', line 8 def name @name end |
#outcome ⇒ Object
Returns the value of attribute outcome.
8 9 10 |
# File 'lib/urbanairship/automations/pipeline.rb', line 8 def outcome @outcome end |
#status ⇒ Object
Returns the value of attribute status.
8 9 10 |
# File 'lib/urbanairship/automations/pipeline.rb', line 8 def status @status end |
#timing ⇒ Object
Returns the value of attribute timing.
8 9 10 |
# File 'lib/urbanairship/automations/pipeline.rb', line 8 def timing @timing end |
#url ⇒ Object
Returns the value of attribute url.
8 9 10 |
# File 'lib/urbanairship/automations/pipeline.rb', line 8 def url @url end |
Instance Method Details
#payload ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/urbanairship/automations/pipeline.rb', line 28 def payload fail ArgumentError, 'enabled must be set to create pipeline payload' if @enabled.nil? fail ArgumentError, 'outcome must be set to create pipeline payload' if @outcome.nil? { activation_time: activation_time, cancellation_trigger: cancellation_trigger, condition: condition, constraint: constraint, creation_time: creation_time, deactivation_time: deactivation_time, enabled: enabled, historical_trigger: historical_trigger, immediate_trigger: immediate_trigger, last_modified_time: last_modified_time, name: name, outcome: outcome, status: status, timing: timing, url: url }.delete_if {|key, value| value.nil?} #this removes the nil key value pairs end |