Exception: ZuoraAPI::Exceptions::ZuoraAPIUnkownError

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Error

#parse_message

Constructor Details

#initialize(message = nil, response = nil, errors = [], successes = [], *args) ⇒ ZuoraAPIUnkownError

Returns a new instance of ZuoraAPIUnkownError.



133
134
135
136
137
138
# File 'lib/zuora_api/exceptions.rb', line 133

def initialize(message = nil,response=nil, errors = [], successes = [], *args)
  @code = response.class.to_s == "HTTParty::Response" ? response.code : nil
  @message = parse_message(message)
  @response = response
  @default_message = "An unkown error occured. Workflow is not responsible. Please contact Support."
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



130
131
132
# File 'lib/zuora_api/exceptions.rb', line 130

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.



131
132
133
# File 'lib/zuora_api/exceptions.rb', line 131

def default_message=(value)
  @default_message = value
end

#responseObject (readonly)

Returns the value of attribute response.



130
131
132
# File 'lib/zuora_api/exceptions.rb', line 130

def response
  @response
end

Instance Method Details

#to_sObject



140
141
142
# File 'lib/zuora_api/exceptions.rb', line 140

def to_s
  @message || @default_message
end