Exception: Yandex::Direct::ApiException

Inherits:
StandardError
  • Object
show all
Defined in:
lib/yandex_direct/api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, code, details) ⇒ ApiException

Returns a new instance of ApiException.



10
11
12
# File 'lib/yandex_direct/api.rb', line 10

def initialize(message, code, details)
  @message, @code, @details = message, code, details
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



8
9
10
# File 'lib/yandex_direct/api.rb', line 8

def code
  @code
end

#detailsObject (readonly)

Returns the value of attribute details.



8
9
10
# File 'lib/yandex_direct/api.rb', line 8

def details
  @details
end

#messageObject (readonly)

Returns the value of attribute message.



8
9
10
# File 'lib/yandex_direct/api.rb', line 8

def message
  @message
end

Instance Method Details

#to_sObject



14
15
16
# File 'lib/yandex_direct/api.rb', line 14

def to_s
  "#{code}: #{message}"
end