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



548
549
550
551
552
# File 'lib/zendesk_api/resources.rb', line 548

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



554
555
556
557
558
# File 'lib/zendesk_api/resources.rb', line 554

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



538
539
540
541
# File 'lib/zendesk_api/resources.rb', line 538

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

#any_conditions=(any_conditions) ⇒ Object



543
544
545
546
# File 'lib/zendesk_api/resources.rb', line 543

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