Class: Yandex::Direct::ActionResult

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Model
Defined in:
lib/yandex/direct/action_result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ ActionResult

Returns a new instance of ActionResult.



5
6
7
8
9
# File 'lib/yandex/direct/action_result.rb', line 5

def initialize(*args)
  super
  self.Warnings = Array(self.Warnings).map{|attributes| ExceptionNotification.new(attributes)}
  self.Errors = Array(self.Errors).map{|attributes| ExceptionNotification.new(attributes)}
end

Instance Attribute Details

#ErrorsObject

Returns the value of attribute Errors.



4
5
6
# File 'lib/yandex/direct/action_result.rb', line 4

def Errors
  @Errors
end

#IdObject

Returns the value of attribute Id.



4
5
6
# File 'lib/yandex/direct/action_result.rb', line 4

def Id
  @Id
end

#WarningsObject

Returns the value of attribute Warnings.



4
5
6
# File 'lib/yandex/direct/action_result.rb', line 4

def Warnings
  @Warnings
end

Instance Method Details

#errors?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/yandex/direct/action_result.rb', line 10

def errors?
  Array(self.Errors).compact.any?
end

#warnings?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/yandex/direct/action_result.rb', line 13

def warnings?
  Array(self.Warnings).compact.any?
end