Exception: ZuoraConnect::Exceptions::APIError

Inherits:
Error
  • Object
show all
Defined in:
lib/zuora_connect/exceptions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message: nil, response: nil, code: nil) ⇒ APIError

Returns a new instance of APIError.



41
42
43
44
45
46
# File 'lib/zuora_connect/exceptions.rb', line 41

def initialize(message: nil,response: nil, code: nil)
  @code = code
  @message = message
  @response = response
  @default_message = "Connect update error."
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



38
39
40
# File 'lib/zuora_connect/exceptions.rb', line 38

def code
  @code
end

#default_message=(value) ⇒ Object (writeonly)

Sets the attribute default_message

Parameters:

  • value

    the value to set the attribute default_message to.



39
40
41
# File 'lib/zuora_connect/exceptions.rb', line 39

def default_message=(value)
  @default_message = value
end

#responseObject (readonly)

Returns the value of attribute response.



38
39
40
# File 'lib/zuora_connect/exceptions.rb', line 38

def response
  @response
end

Instance Method Details

#to_sObject



48
49
50
# File 'lib/zuora_connect/exceptions.rb', line 48

def to_s
  @message || @default_message
end