Module: ZendeskAPI::Conditions

Included in:
Automation, Trigger, View
Defined in:
lib/zendesk_api/resources.rb

Instance Method Summary collapse

Instance Method Details

#add_all_condition(field, operator, value) ⇒ Object



651
652
653
654
655
# File 'lib/zendesk_api/resources.rb', line 651

def add_all_condition(field, operator, value)
  self.conditions ||= {}
  self.conditions[:all] ||= []
  self.conditions[:all] << { :field => field, :operator => operator, :value => value }
end

#add_any_condition(field, operator, value) ⇒ Object



657
658
659
660
661
# File 'lib/zendesk_api/resources.rb', line 657

def add_any_condition(field, operator, value)
  self.conditions ||= {}
  self.conditions[:any] ||= []
  self.conditions[:any] << { :field => field, :operator => operator, :value => value }
end

#all_conditions=(all_conditions) ⇒ Object



641
642
643
644
# File 'lib/zendesk_api/resources.rb', line 641

def all_conditions=(all_conditions)
  self.conditions ||= {}
  self.conditions[:all] = all_conditions
end

#any_conditions=(any_conditions) ⇒ Object



646
647
648
649
# File 'lib/zendesk_api/resources.rb', line 646

def any_conditions=(any_conditions)
  self.conditions ||= {}
  self.conditions[:any] = any_conditions
end